using osql utility i have converted a table in database to excel format. I have also chinese data in my database . The problem is while converting the data into excel format ,the chinese data is not comming in excel sheet.
Does anybody have an idea about this .
For converting i have used
declare @.x varchar(300)
set @.x = 'osql -S Servername -U username -P passwd -q "select * from northwind..region order by cand_index" -w 3000 -s "," -o C:\directory\filename.csv'
ThanksDid you try using BCP instead and may be try using 950 codepage as a one of the switches . eg. -C950
something like
bcp "Select * from Northwind.dbo.region" queryout "D:\temp\filename.csv" -c -T -C950
Use other switches to specify field seperator -t etc
let know how it goes
...|||I would add a -u parameter to your OSQL command.
-PatP
No comments:
Post a Comment