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)
 How do I get quotes around strings in bulk copy csv file?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-11-30 : 00:00:17
Robert writes "I'm using bcp in a stored procedure for the first time, and need the output to be in .csv (comma delimited) format.

I've got that part ok using the delimiter tag, but the data I'm exporting has commas in it at times (e.g. name = "Doe,John"), and results in the output being parsed into too many columns: "Doe" and "John". I've used "quote strings" options in other apps to overcome this issue before, but am not seeing how to do it with bcp/SQL.

Possible?

Thanks!"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-30 : 03:03:54
Refer this
http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -