dimanche 24 juillet 2016

Put N Unicode before variable in sql server?

We usually use N for unicode string literals like that:

Select * 
From Customer 
Where Name = N'កខគ' --Unicode

Now I want to change to be like that:

Declare @a varchar(Max)

Select * 
From Customer 
Where Name = N''+@a

At the second SQL statement it doesn't work at all. Any ideas? Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire