Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mp01
Starting Member
11 Posts |
Posted - 2006-02-04 : 12:13:12
|
I'm trying to export data from a query into a text file with the format shown below. I've tried using various DTS export format options without success. Any assistance would be appreciated.Here's the format needed for the text file:<field 1>DataFrom field 2<field 3>Data from field 4<field 5>Thanks,Mark |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-02-04 : 12:16:13
|
I'd create an sp to format the rows then use bcp (or dts I suppose) to call it==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
mp01
Starting Member
11 Posts |
Posted - 2006-02-05 : 14:31:05
|
Will you give me a hint as to how I create an sp to format the rows? |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-02-05 : 14:36:05
|
create proc s_formatoutptasselect '<field 1> + convert(varchar(1000),[field 2])+ '<field 3> + convert(varchar(1000),[field 4])+ '<field 5>from tblgo==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
mp01
Starting Member
11 Posts |
Posted - 2006-02-05 : 23:36:53
|
Thanks, NR. |
 |
|
|
|
|