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. |