开发者

Collation Problem in asp.net connecting sql

开发者 https://www.devze.com 2023-01-30 07:43 出处:网络
Hi when I use this query I don\'t get any result. In my table I have used collation Macedonian_BIN so the letters are in Macedonian Language.

Hi when I use this query I don't get any result.

In my table I have used collation Macedonian_BIN so the letters are in Macedonian Language. What I need to do this code to work, it doesn't compare 2 values

For example

НОВ=НОВ

The ed is getting the value HOB I guess the problem is when is comparing the HOB value with the HOB in database

select * from Publ开发者_JAVA技巧isher where Motor  like '%" + ed + "%'


You can explicitly add the COLLATE keyword to change the default collation as follows:

select * from Publisher 
where Motor COLLATE Macedonian_BIN like '%" + ed + "%' ";

(substitute your desired collation)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号