jeffwest21
IS-IT--Management
I am trying to output a table using BCP in a stored procedure, problem i am having is that I don't get a double quote at the start of the file, and get one on the last line in the file, like below
00008373","30/09/2013 16:31","30/09/2013 16:31
"
This is what I am using to bcp
If anyone can help me see what is wrong with this i would be really grateful.
'Clever boy...'
00008373","30/09/2013 16:31","30/09/2013 16:31
"
This is what I am using to bcp
Code:
select @sql = 'bcp "select * from Database.dbo.Table " queryout '+ @file +' /c -t \",\" -r \n\" -T -S' + @@servername
exec xp_cmdshell @sql
print @sql
If anyone can help me see what is wrong with this i would be really grateful.
'Clever boy...'