user1608661
user1608661

Reputation: 1

working with SQL query

Summary: How to use Japanese key word in where condition. For ex:

select * from tbl_Mst_Product_Language  where Name = N'闲云舒展'    

Here in above query in where condition I have used Japanese keyword which is working fine. But I want to put this value in variable as I need to pass this from c#.

Problem I am facing is where I am trying to put where conditon in variable . For example

declare @test as nvarchar(max)
set  @test = '闲云舒展'
select * from tbl_Mst_Product_Language  where Name =  @test

Upvotes: 0

Views: 53

Answers (1)

ta.speot.is
ta.speot.is

Reputation: 27214

Where you have:

declare @test as nvarchar(max)
set @test = '闲云舒展'
select * from tbl_Mst_Product_Language where Name = @test

Try:

declare @test as nvarchar(max)
set @test = N'闲云舒展' -- Note here, N
select * from tbl_Mst_Product_Language where Name = @test

Upvotes: 2

Related Questions