July 28, 2011 at 12:50 pm
I have a lookup which is looking in a table for a column that is a char(4) datatype. If its not found I redirect it to an oledb destination to be inserted. My SSIS datatype is string 4. My problem is that I have 4 records coming into the dataflow from a text file which have values that are 3 characters long. When it gets inserted in the database there is an extra space added to the end of the value..(ex 'WCW' winds up 'WCW ' in the database table). Everytime i run this it never finds the match for 'WCW' in the lookup. I have added a derived column to add a new column with the value with rtrim and ltrim to remove end spaces and I use it in the lookup to match and mapped it to my destination to insert the trimmed value into the table however the value in the table still has a trailing space. How can I get around this issue?
July 28, 2011 at 1:23 pm
Fixed it by concatenating a space on the end of the value when the length of the value was 3. All of this inside a derived column transformation
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply