Groups | Blog | Home
all groups > sql server dts > february 2007 >

sql server dts : Creating Header and Trailer Record in a Fixed-Width Text File


Steven Wong
2/10/2007 6:35:00 AM
How do you use DTS packages to create Header and Footer Records and
incorporate onto a Fixed-Width Text File? So, in the Text file it will be in
the order of Header record, Detail data records, and Footer/Trailer Record.

Allan Mitchell
2/10/2007 8:56:02 PM
You could write out to 3 files and then use COPY on the cmd line
(Execute Process task) to concatenate these files together.

--


Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com



[quoted text, click to view]
Steven Wong
2/12/2007 8:30:00 AM
Do you know of any other creative workaround way if I want to create all
these in just 1 text file? Like....is there a way to append output within a
SQL task in DTS?

Thanks for your prompt response.

[quoted text, click to view]
AlterEgo
2/12/2007 3:28:40 PM
Steven,

The cleanest way is to use the FileSystemObject in an ActiveX script. Search
Google, you should get a lot of hits on how to manipulate the FileSystem
Object.

-- Bill

[quoted text, click to view]

AddThis Social Bookmark Button