SQL Server 2005中将"φ"音译为"f"的问题

smc*_*hon 2 sql-server-2005

在我们的SQL Server 2005计算机上,我遇到了一个错误,在为具有某些字符限制的下游系统准备数据时,所有'f'字符都被删除了.

我发现在UDF中有一个声明试图用''替换'φ'字符.问题是,至少在我们的SQL Server安装中,'φ'和'f'是一回事.

有人能告诉我区分'φ'和'f'的最佳方法是什么?

例:

select case when '?' = 'f' then 'equal' else 'not equal' end
Run Code Online (Sandbox Code Playgroud)

对我来说,这回归"平等"

Mar*_*ith 6

N'?'在字符串文字中使用,因此不会强制进入默认排序规则.

对我来说(下SQL_Latin1_General_CP1_CS_AS)

select case when '?' = 'f' then 'equal' else 'not equal' end /*equal*/

select case when N'?' = 'f' then 'equal' else 'not equal' end /*not equal*/
Run Code Online (Sandbox Code Playgroud)