Pradip Meghapra
Pradip Meghapra

Reputation: 148

Getting wrong output when try to run SQL Server query

I am trying below query but not getting proper output. It will return me garbage value.

I have try this query :

select convert(nvarchar(max), '.4ah開発進捗状況(週報)')

Output of my query :

.4ah??????(??)

Thanks

Upvotes: 0

Views: 59

Answers (1)

Paresh J
Paresh J

Reputation: 2419

Try adding 'N' before your chinese string, it simply converts your string to unicode. Just check this:

select convert(nvarchar(max), N'.4ah開発進捗状況(週報)')

Using 'N' prefix means declaring the string as nvarchar data type, rather than varchar.

Upvotes: 4

Related Questions