Chani Poz
Chani Poz

Reputation: 1463

Get "????????" from Sql Server

When I exec my procedure I get ?????????? character instead of Hebrew character.

The code in procedure:

CREATE TABLE #myTempTable   
(
    [ya_id] [int],
    [ya_title] [varchar](200) NULL,
    RowNumber [int]
)

set @sql ='insert INTO #myTempTable
    select [ya_id],
    [ya_title],
    ROW_NUMBER() OVER (ORDER BY ya_date desc)
FROM   y_ads join ezorim on e_id=ya_e_id join y_cat on ya_yc_id=yc_id'
exec(@sql)


/*Ads*/
SELECT [ya_id],
    [ya_title],
from #myTempTable 
where RowNumber BETWEEN 1 AND 24

The encoding of the sql server: SQL_Latin1_General_CP1_CI_AS

p.s. the other dynamic tables from the procedure return correct character, just that dynamic table returns ??????????.

Upvotes: 1

Views: 54

Answers (1)

SLaks
SLaks

Reputation: 887459

You should use NVARCHAR, which can hold Unicode characters.

Upvotes: 5

Related Questions