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)
 Query Analyzer CSV file has extra line

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2004-01-10 : 15:47:47
I've written a stored proc to produce a CSV file using Query Analyzer. The CSV is written to disk using the "write to file" option in the query drop-down menu.

The file has two carriage returns at the end, so DTS thinks it found a bad line at the end of the file and throws error messages.

I need to edit every CSV by hand and remove the extra CR to get rid of the messages.

Is there any way to get rid of the extra CR or instruct DTS to ingore the CR at the end of file?

Sam

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-01-10 : 16:30:21
Don't use QA for the actual output. Use bcp to execute the procedure instead.

Is it me, or does it seem strange to use bcp to run a sproc to create a CSV file that DTS can import? Why not just have DTS connect directly and execute the sproc? Or use bcp to output the file and import it again?
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2004-01-10 : 17:48:55
Thanks Rob.

Sam
Go to Top of Page
   

- Advertisement -