Reputation: 723
I'm creating a data flow task in SSIS that compares two tables and updates the second based on the first. I'm basically following this guide nearly word for word: https://www.mssqltips.com/sqlservertip/5082/synchronize-table-data-using-a-merge-join-in-ssis/.
I'm getting the following error message with the second condition split:
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
------------------------------
Looks like I've got some syntax issues and my hunch is that my column names with spaces in them cannot be handled. I cannot change the column names in either table so I'm wondering if there is a way to phrase the expression so that it accepts the column names with spaces. What would be the best course of action in this situation?
Upvotes: 0
Views: 792
Reputation: 31785
You need square brackets around all the column names that have spaces.
For instance, in this bit:
(Core Competency Service Provided != [Core Competency Service Provided (1)])
you have them around [Core Competency Service Provided (1)]
but not around Core Competency Service Provided
Upvotes: 1