Showing posts with label chinese. Show all posts
Showing posts with label chinese. Show all posts

Monday, March 12, 2012

osql utility

Hi all
I am using osql utility in sql server 2000 to convert data in database to excel sheet. My datas contain both english and chinese . While converting to excel sheet english datas are comming but the datas in chinese is comming like (?) this. Does any body has any idea to solve this problem. is there any way to set font in osql utility.

set @.x = 'osql -S servername -U username -P password -q "select * from

northwind..region" -w 3000 -s "," -o C:\Download\download.csv'
This is what i have used.
Note: I tried giving chinese font in excel still it is not working.
Its really urgent pls reply
thanksHave you tried using the -u parameter of OSQL.EXE to force Unicode output? That would be needed for Chinese characters.

-PatP|||What version of Excel are u using Have u turned on Multilingual

osql utility

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