I am having an issue with setting a double quote (") text delimter to my .csv file using BCP.
Take for example the current SQL script;
declare @sql varchar(8000)select @sql = 'bcp dmP.pdiStb.vTest2 out
c:\bcp\test001234.csv -c -t"\",\"" -T -S'+ @@servername
EXEC master..xp_cmdshell @sql
When I execute the above, I get a CSV file that looks like the following;
55","sql_gmi_srv","Policy_RenewalDueDate
The above is missing a double quote at the start and end of the file, is there a solution to solve this?