why no results are displayed when searching a value in Hebrew string?

hebrew, select, sql, sql-server-2008

Solution

Use the N prefix so the string literal is interpreted as unicode not char under the code page of whatever your database's default collation is

Try this

SELECT [ID] ,[Caption] FROM  [Dictionary] where Cast(Caption AS Nvarchar(max))like N'חי%'

Problem

this is my sql query ``` SELECT [ID] ,[Caption] FROM [Dictionary] where Caption like 'חי%' ``` The information exists in my table, but is not displayed. When i change the hebrew word (חי) to english word it works fine. I have Microsoft sql 2008..(if it matters..) what am i missing here?

Original source

Related problems