SSIS条件分裂错误,语法相关?

时间:2018-02-06 21:52:18

标签: sql-server azure ssis

我正在SSIS中创建一个数据流任务,用于比较两个表并根据第一个表更新第二个表。我基本上是逐字逐句地遵循本指南:https://www.mssqltips.com/sqlservertip/5082/synchronize-table-data-using-a-merge-join-in-ssis/

我在第二个条件分割时收到以下错误消息:

TITLE: Microsoft Visual Studio
------------------------------

Error at Data Flow Task [Update [343]]: Attempt to parse the expression "(Level != [Level (1)]) || (Status != [Status (1)]) || (Core Competency Service Provided != [Core Competency Service Provided (1)]) || (Location != [Location (1)]) || (Outsourced Process != [Outsourced Process (1)]) || (Contact != [Contact (1)]) || (Phone != [Phone (1)]) || (Email != [Email (1)])" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis.

Error at Data Flow Task [Update [343]]: Cannot parse the expression "(Level != [Level (1)]) || (Status != [Status (1)]) || (Core Competency Service Provided != [Core Competency Service Provided (1)]) || (Location != [Location (1)]) || (Outsourced Process != [Outsourced Process (1)]) || (Contact != [Contact (1)]) || (Phone != [Phone (1)]) || (Email != [Email (1)])". The expression was not valid, or there is an out-of-memory error.

Error at Data Flow Task [Update [343]]: The expression "(Level != [Level (1)]) || (Status != [Status (1)]) || (Core Competency Service Provided != [Core Competency Service Provided (1)]) || (Location != [Location (1)]) || (Outsourced Process != [Outsourced Process (1)]) || (Contact != [Contact (1)]) || (Phone != [Phone (1)]) || (Email != [Email (1)])" on "Update.Outputs[Updated_Entries]" is not valid.

Error at Data Flow Task [Update [343]]: Failed to set property "Expression" on "Update.Outputs[Updated_Entries]".



------------------------------
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0204006 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------

看起来我有一些语法问题,我的预感是我的列名称中包含空格无法处理。我无法更改任何一个表中的列名,所以我想知道是否有一种方法来表达表达式,以便它接受带有空格的列名。在这种情况下,最好的做法是什么?

1 个答案:

答案 0 :(得分:1)

在所有包含空格的列名称周围需要使用方括号。

例如,在这一点:

(Core Competency Service Provided != [Core Competency Service Provided (1)])

你有[Core Competency Service Provided (1)]但不在Core Competency Service Provided

附近