January 26, 2012 at 1:24 pm
I have a ssis, I would like to do an incremental Add records load.
I first use a lookup task to check in the table if there are matched records of primary key, I have 3 columns is prirmay key, so in the column mapping in lookup task, I link those 3 columns in the available input columns and lookup columns.
Then point the no match records link to the OLEDB destination.
The first time load is correct. But when doing the second time load, I didn't change the source file, it is supposed to load 0 records, but I still get a lot of records, that are not matching.
what I do wrong here?
Thanks
January 26, 2012 at 1:27 pm
I'm guessing embedded spaces. The lookup is VERY sensitive to this and it drives me crazy.. Filter out the spaces before the lookup because they are probably not persisted in the table.
CEWII
January 26, 2012 at 1:54 pm
Thanks, I think I identified the column is a char(30) named allocationType.
It caused the mistmatch, although the data look exactly the same from input and table.
The value is not a fixed 30 character length, but it can be less than 30. For now I cannot change the table schema, but how can I make them to be the same for for Lookup task to match.
I tried to use substring for the table data, but it is not working
Thanks
January 26, 2012 at 2:08 pm
You might try RTRIM..
CEWII
January 26, 2012 at 2:12 pm
Thanks, it works after I rtrim the table column,
Also see this article may be helpful.
http://consultingblogs.emc.com/kristianwedberg/archive/2006/02/22/2955.aspx
January 26, 2012 at 2:23 pm
I've been burned by this little problem before.. It makes it easy to remember..
CEWII
January 27, 2012 at 12:17 am
Elliott Whitlow (1/26/2012)
I've been burned by this little problem before.. It makes it easy to remember..CEWII
And don't mention the case sensitivity... :angry:
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 27, 2012 at 7:58 am
Ah, aparently another burn victim..
CEWII
January 27, 2012 at 9:35 am
Do you know if any service pack of SQL 2008 fix these ?
Thanks
January 27, 2012 at 9:46 am
None that I am aware of.
CEWII
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply