Search code examples
sqlsql-servercollationgeorgian

How to return georgian string in SQL Server


I have a query below:

case 
   when 1 = (select Loc_ID from tbl_Web_User where Phone = '123456789') 
      then 'Reached Quota' 
      else 'მიღწეული კვოტა' 
end

When I returned georgian characters, it returns ?????????? like this. How can I show georgian string correctly?


Solution

  • You need to make sure to specify that you need Unicode string literals - you do that by prefixing the string with a N - like this:

    case 
       when 1 = (select Loc_ID from tbl_Web_User where Phone = '123456789') 
          then N'Reached Quota' 
          else N'მიღწეული კვოტა' 
    end