June 16, 2010 at 4:33 am
Hi,
I have a flat file containing data as follows:
10,XYZ,D,1,12345
11,ABC,D,2,12122
12,PQR,D,1,22233
In above format, I have D,1 or D,2 as one field to be inserted in the table from SQL server database. My table has four columns, viz. empid, empname, address, salary. I want to insert this D,1 and D,2 as one value for address.
This is done by Bulk Insert task. My column delimiter is comma(,) and row delimiter is {CR}{LF}.
Can you pls tell me how to handle this data while loading into the emp table?
June 16, 2010 at 4:42 am
I'm afraid you can't merge the columns in the Bulk Insert Task.
You could set-up a data flow with a Flat File Source where you read all of the file contents.
Then use a derived column to merge to two columns to a new column.
Finally, write everything away with the OLE DB Destination. Make sure you map only the columns that you need.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 16, 2010 at 4:45 am
Thanks a lot. I'll try with that.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply