为什么我不能在 SSIS 表达式生成器中转义双引号字符?

Why can't I escape double quote characters in SSIS Expression Builder?

我正在尝试向 SSIS 中的条件拆分转换添加条件,但条件中字符串开头的双引号字符引发错误。

这是我的条件:

(FirstName != LkUp_FirstName) || ((ISNULL(MiddleName) ? “abc” : MiddleName) != (ISNULL(LkUp_MiddleName) ? “abc” : LkUp_MiddleName)) || (LastName != LkUp_LastName)

这是我在条件拆分转换编辑器上单击“确定”时收到的错误消息的开头:

Error at Data Flow Task [Conditional Split [105]]: Attempt to parse the expression "(FirstName != LkUp_FirstName) || ((ISNULL(MiddleName) ? “abc” : MiddleName) != (ISNULL(LkUp_MiddleName) ? “abc” : LkUp_MiddleName)) || (LastName != LkUp_LastName)" failed.  The token " " at line number "1", character number "57" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

我试图通过将条件更改为:

(FirstName != LkUp_FirstName) || ((ISNULL(MiddleName) ? \“abc\” : MiddleName) != (ISNULL(LkUp_MiddleName) ? \“abc\” : LkUp_MiddleName)) || (LastName != LkUp_LastName)

但随后我收到以下错误:

Error at Data Flow Task [Conditional Split [105]]: Attempt to parse the expression "(FirstName != LkUp_FirstName) || ((ISNULL(MiddleName) ? \“abc\” : MiddleName) != (ISNULL(LkUp_MiddleName) ? \“abc\” : LkUp_MiddleName)) || (LastName != LkUp_LastName)" failed. The token "\" at line number "1", character number "57" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

正如 Prabhat G 所说 “abc” 是复制粘贴,所以我删除了双引号并再次手动输入。

经验教训:从头开始构建表达式总是更好!