February 20, 2009 at 11:43 am
I just recently started working with SSIS packages to transfer flat files in and out of systems. Everything seemed to be going well until I had to figure out how to manipulate data during imports. An example is that I have a csv file that has a column with ID numbers and a column with a single F or R. I need those F and R's to be transformed to FRE and RED when brought into the DB. My SSIS book has nothing about it and I can't find anything on google. I'm sure I'm just not searching for the correct terminology. Any assistance would be greatly appreciated
February 20, 2009 at 12:49 pm
In your Data flow task
Put a derived Column Transformation between your file source and table destination.,
Add a column using the source column you want to change.
and put an expression,.
[Column 0]=="F"? "FRE":[Column 0]=="R"?"RED":[Column 0]
replace [Column 0] with your column.
The expression reads
If Column 0 = F then 'FRE'
Else IF Column 0 = 'R' then 'RED'
Else Column 0
February 23, 2009 at 7:07 am
That did it. Thanks a bunch
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply