June 5, 2012 at 10:57 am
I am extracting file from a Flat File source into a SQL table, then shredding one row at a time thru a For Each Loop. While in the For each loop I am transforming some data and then writing the results to a Flat File Destination. My first issue was with each iteration thru the For Each loop, the previous inserts into the destination were being over written. I corrected this by unchecking "Overwrite data in file", now my problem is that for each iteration, the header row is being written each time with the data that I want.
I need the header row, but only one time at the beginning of the file.
How can I overcome the header being written each time?
Any and all help will be greatly appreciated.
June 5, 2012 at 11:56 pm
You can write the header row once manually, and configure the flat file connection manager to not have a header row.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 6, 2012 at 5:38 am
Agreed with Koen.. But instead of writing the header manually once (i.e. if you want the whole thing to be automated) you can do this :
1) Create a file say FileX using a DFT which would write only the header but no data rows.
2) Using another DFT write data rows to file created in step 1 i.e. FileX.
Hope this is of some good .. 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply