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 2008 Forums
 Transact-SQL (2008)
 querying postgressql utf-8 issue

Author  Topic 

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2013-06-17 : 16:35:15
hi there

I create a linked server to musicbrainz postgres data on a local virtual machine.

SELECT a.*, a.name collate latin1_general_ci_as , CAST(a.name as nvarchar(1000))
FROM OPENQUERY(musicbrainz,'SELECT * FROM musicbrainz.artist_name where id = 12') As a

the result I get brings back square brackets for rows with data in Chinese, Japanese. how do I go about getting the proper character in my query ?

Thanks!

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-18 : 00:34:34
use a suitable collation which supports chinese,japanese characters


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2013-06-18 : 11:10:13
the tables also have rows with other lanaguages, is there a generic collation that can be used for all languages. I also found out I can manipulate the collation on the properties of the linked server

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -