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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Difference in osql output

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-09-19 : 09:11:29
San writes "Hi

I am using one stored procedure to print a set of table records. When I execute the stored procedure in query analyser, records are printed correctly in the result pane. But I need the result set in a flat txt file. So I used the osql utility to get the output in a flat file. In that flat file, if the line size is more than 80 char length, records are printed in next line.
It should not be like that. It should be printed in the same line. Why its printing in different line? Pls help me...

Note:
There is no word-wrap in that flat file. I opened the flat file in notepad, wordpad, word etc.. Still its coming in next line.
But in query analyser, its printing in same line..

Sql Version : Microsoft SQL Server 2000 - 8.00.194
OS : Windows 2000 Server

Thanks
San"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-09-19 : 16:12:56
check out the -w parameter for osql in BOL

HTH
Jasper Smith
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-09-19 : 18:35:35
How about using bcp? It's designed for data import/export and doesn't suffer from any line width issues. There's more information on it in Books Online.

Go to Top of Page
   

- Advertisement -