SQL Select Command with Unicode string is not Retrieving the Expected Data

故事扮演 提交于 2019-12-12 14:25:10

问题


I am using SQL Server 2008 R2. I want the retrieve the row from table in which data is other than than English.

But when I type the command it returns me nothing.

SELECT * 
FROM PARTY 
WHERE NAME LIKE 'رانا عطا ربانی' 
ORDER BY SRNO

Any suggestions, how to retrieve record like that?


回答1:


Have you tried declaring the string literal as unicode?

SELECT * FROM PARTY 
WHERE NAME LIKE N'رانا عطا ربانی' 
ORDER BY SRNO

[This will show you all string-related columns in your database, and their collation: Collation conflict SQL Server 2008 ]



来源:https://stackoverflow.com/questions/14411689/sql-select-command-with-unicode-string-is-not-retrieving-the-expected-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!