November 7, 2014 at 2:16 pm
Hi I have a bit of a dilemma I am wanting to creating a column based on a value in a flatfile, and insert that value into the destination table...
I have a flatfile and a oledb destination, I dropped a script component on the dataflow tab, and I am wanting to take an existing field and create a for lack of a better word, "CODE" field based on that value. How would I accomplish this?
Exmple--- where description = Test1 code = 1, Test2 code = 2, and same thing for Test3
Description code
Test1 1
Test2 2
Test3 3
November 14, 2014 at 6:07 am
If the code value is embedded in the text you could use a derived column task with a REPLACE() function.
If You want Test1 = A, Test2 = B, Test3 = C then you could use inline IIFs if there are not too many of them or create a reference table (a .txt file would suffice) and load it as a data source then do a lookup on it.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply