February 1, 2002 at 9:41 am
Is there a switch to place dbl quotes around text using BCP? -JG
-JG
February 1, 2002 at 10:19 am
February 1, 2002 at 10:36 am
Yes, I was wanting to place dbl quotes around my text in the output of BCP.
I have 45 tables I need to export to text. I looked at using DTS export wizard, but it would require me to perform that function 45 times, since I could not find a way to select all the tables to export at once. DTS export wizard adds dbl quotes around text. But I can not find the feature using BCP.
Sorry about the dbl post. I could not delete it.
-JG
February 6, 2002 at 2:55 pm
I don't see a switch. It could be done in a query using queryout 'select "' + Fieldname + '", ...
How badly do you need this and why?
February 6, 2002 at 3:02 pm
Ok, so I was a bit lazy with the quotes. This actually works.
declare @sql nvarchar(1000)
set @sql = 'select ''"'' + cast(id as varchar(1000)) + ''"'', ''"'' + name + ''"'' from sysobjects'
print @sql
exec sp_executesql @sql
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply