Saturday, February 25, 2012

problem using LIKE in UNICODE characters...

I have a table with nVarchar column.

If i do a search like this
----------------------
SELECT ID, Book, Chapter, Number, Amharic, English
FROM tbl_test
WHERE (Amharic LIKE '%???%')

----------------------

it doesn't return anything but if i add 'N' after LIKE as
----------------------
SELECT ID, Book, Chapter, Number, Amharic, English
FROM tbl_test
WHERE (Amharic LIKE N'%???%')

----------------------

It returns the whole table without filtering.

Can someone help me with this?

What about this:

WHERE RTRIM(Amharic) LIKE '%???%'

No comments:

Post a Comment