October 14, 2009 at 2:34 pm
Hello all,
I am doing BCP Out operation out of a sql table on SQL Server 2005. I have two columns in the table; which are currency codes columns.
Curr_Code varchar(1)
Curr_Code_Euro varchar(1)
I am outputting file in to CSV file.
everything is fine except Currency columns:
for "£" i am getting "œ" and for "€" I am getting "_" in the output
declare @sql as varchar(1000)
set @sql = 'bcp "select * from test_rjp" queryout "\j-serv-01\vg\temp\test.csv" -c -t, -Usa -P abcde'
exec master..xp_cmdshell @sql
Can somebody help please??
Thx,
-RP
October 15, 2009 at 9:14 am
Try using "-C" (uppercase) and defining your database/Column collation.
October 16, 2009 at 12:45 pm
Thanks a lot... it solved my issue right away.
-RP
November 8, 2010 at 5:45 am
...Thanks; just resolved my issue too, appended a "...-C RAW" statement to the bcp command syntax;
SET @bcpCommand = 'bcp "EXEC <SP> ''' + @batchID + ''', 1" queryout "' + @sFileSpec1 + '" -t"," -c -T -C RAW'
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply