Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Unicode problem

Author  Topic 

jonasalbert20
Constraint Violating Yak Guru

300 Posts

Posted - 2006-03-08 : 02:41:07
My query is this...

SELECT top 1 (sup.SupplierName) , sm_ID, sm_Code
FROM tblStockmaster as sm
INNER JOIN dbo.vwSupplierQuery as sup ON sup.SupplierCode = sm.Supplier_Code


result is this...

SELECT '�y•Ø�@—¬�z#711;O‰#310;‰#332;äÉ‹#261;¨|�#298;¨H‹#316;�»‘¢—L#140;#260;‰#316;#711;Š' AS supplierName, 269 as sm_ID, 'CH-0508-1.6' as sm_Code


Im getting those garbage characters. What i want is to display the actual unicode character which is in japanese.

How???




Want Philippines to become 1st World COuntry? Go for World War 3...

Tahsin
Starting Member

34 Posts

Posted - 2006-03-08 : 10:33:19
Try to use the "COLLATE" statement in your query.

EX:
SELECT top 1 (sup.SupplierName) , sm_ID, sm_Code COLLATE Japanese_Unicode_CI_AS
FROM tblStockmaster as sm
INNER JOIN dbo.vwSupplierQuery as sup ON sup.SupplierCode = sm.Supplier_Code


This will give you all the collation types avalable in Japanese:

SELECT *
FROM ::fn_helpcollations()
WHERE name LIKE 'J%'


- Tahsin
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2006-03-08 : 11:06:44
What's the data type of the dbo.vwSupplierQuery.SupplierName column? Is it varchar or nvarchar? If it's varchar what's the collation?
What characters does it contain for that example row? I think the forum software may have eaten some of them.

Can you post the result of

SELECT top 1 CAST(sup.SupplierName AS varbinary(8000))
FROM tblStockmaster as sm
INNER JOIN dbo.vwSupplierQuery as sup ON sup.SupplierCode = sm.Supplier_Code


Warning: if it's ISO/IEC 2022 coded, I probably can't help, as I know nothing. If it's CP932 (aka Shift_JIS) I can probably guess my way through it!
Go to Top of Page
   

- Advertisement -