August 3, 2011 at 2:31 pm
Hi,
I am currently producing a PIPE line text file, I need to put BOF above the header but not sure how to do this
BOF
"ID"|"PP_CODE"|"LI_BAT"
Thanks
August 3, 2011 at 2:47 pm
The first question would be how are you creating the file?
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
August 3, 2011 at 3:04 pm
An ugly way of doing it, which would still work, would be to divide your task into three data flow tasks.
To start off with, you would define your flat file connection manager with the three columns, and indicate that the file does not have a header row.
Then, you would have your first data flow task. This task would contain a script source that would produce a single row that has "BOF" as the value for the column "ID", and empty strings for the other two columns. It would then have a flat file destination, with the connection pointing to the flat file connection manager above.
The second data flow task produces another single row, that has "ID", "PP_CODE", and "LI_BAT" as the values for those respective columns. It then proceeds to the same flat file destination as above. Make sure you select to not overwrite values for this one.
The third data flow task has a different connection manager for your source, this one would be whatever your source data comes from. Any operations required are done here, and then you write to the same flat file connection manager as the other two, again, without overwriting data.
It's ugly, but SSIS wasn't really designed for what you're trying to do.
August 3, 2011 at 3:09 pm
I would probably simply create a default template file with BOF already in it then simply open that to dump my ouput in. you can add in a renaming taks if needed. you could also write the entire thing in a script task and output BOF and EOF as needed.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply