dbTalk Databases Forums  

Exporting data to text file and formatting

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Exporting data to text file and formatting in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
KMP
 
Posts: n/a

Default Exporting data to text file and formatting - 01-26-2004 , 11:51 AM






Hi
I am exporting data from a table into a txt file (which works great). My problem is that the txt file has to be formatted in a particular fashion (see example below

This is the header portion; the data is coming from a tabl
<Report Title><Column Name><Company Name><Column Name><Location

This is the body of the report; the data is coming from a different tabl
<Col1><Col2><Col3> .........!<Col1><Col2><Col3> ........
Row 1 Row
Row 3 Row

As you can see the data in the body section of the report is divided into two sections. This is how the report looks like in one piece

<Report Title><Column Name><Company Name><Column Name><Location><Col1><Col2><Col3> .........!<Col1><Col2><Col3> ........
Row 1 Row
Row 3 Row

I have tried DTS and am looking into bcp, but haven't had success with formatting. I am using SQL Server 2000 + SP3. Any help will be highly appreciated. Thank you.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.