April 1, 2009 at 2:51 pm
I have a requirement which is something like this:
table A
Name Country State Zip
Anna USA VA 22222
Banu Canada ON 33333
now first thing I need to do is set country = Local if country = USA .. how can do that while reading the table? I know I can do an update statement once the data has been loaded.. can I do this while SSIS is reading and loading the table?
April 1, 2009 at 3:13 pm
Sure you can. You'll have to use SQL Command as you data access mode in your data source configuration, and use the REPLACE function in your SQL code that you are using to retrieve data from the table.
Based on your table A, this will work just fine
SELECT A.Name,
REPLACE(A.Country, 'USA', 'Local') as Country,
A.State,
A.Zip
FROM table A A;
I hope this helps.
Cheers!
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy