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 2005 Forums
 Transact-SQL (2005)
 BCP for quotation

Author  Topic 

tweaker
Starting Member

1 Post

Posted - 2008-05-15 : 11:35:33
I'm using BCP for some command line SQL statement. The file I'm generating is comma delimited. Some of my records contain comma's in them and require them to be in quotation marks. What is the parameter for BCP to put those entries that have commas in them to have those records be in quotation marks?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-15 : 11:41:28
i think you need a format file for customised formatting.

http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2008-05-15 : 12:35:35
Or use tab delimited, but fixed width my be the best way to go

"Got Mainframe?"



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -