September 26, 2003 at 1:46 pm
Hello,
I have to create a search page that will retrieve information in Japanese kanji characters OR Chinese Taiwan OR Chinese PRC characters. I am using a web form (in .NET) to input this data into three separate SQL tables -- one for each language -- where I have set the COLLATE property on the columns to JAPANESE_CI_AI, CHINESE_PRC_STROKE_CI_AI, and CHINESE_TAIWAN_STROKE_CI_AI I can insert the data into the tables and I can say select * from
and view the data but I can't retrieve the records, either from a web search form that calls a stored procedure or using T-SQL directly with select * from tblBooksJapaneseInfo where bookJPTitle like '%‚ ‚肪‚Æ' -- I have tried entering Japanese by using the IME Japanese keyboard and by using the character map with Arial Unicode MS as the font. Has anyone dealt with this issue already who can tell me what COLLATE clause I should use for each language?
September 26, 2003 at 4:52 pm
Make sure you use the N before each string character. IE:
SELECT * FROM tblBooksJapaneseInfo WHERE bookJPTiles like (N'%...%'‚'N'...' )
BTW: It might be easier to just use the Latin1_General_Bin collation on all your fields. The only drawback to that would be sorting the data.
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
September 26, 2003 at 5:28 pm
Thanks very much -- I actually realized that after my post and it solved the problem. I am creating a dynamic SQL statement for the search and so I had to indicate that the terms were unicode.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply