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 with quotes

Author  Topic 

Nith
Starting Member

17 Posts

Posted - 2010-06-09 : 06:31:56
Dear buddies,

I am having a comma delimited data file created using bcp but I also need to include quotes for char fields.

How can I go about it.

I tried to use format file but still couldnt get it working.

I tried using methods stated here as well: http://www.sqlservercentral.com/Forums/Topic457120-19-1.aspx

but managed to get only some parts with quotes.

EG:

Alagu, 20, running around

So, I want it to be

"Nith", 20, "running around"

Methods I tried definetely gave these output:

Alagu","20","running around

No quotes at the beginning and end.

Please help me.

Thanks a lot.
   

- Advertisement -