stacks
stacks

Reputation: 231

SQL cannot select rows with special characters

I am trying to run a query that goes like this:

SELECT TOP (1000) [name] 
FROM [mpnew].[dbo].[arts] 
WHERE [grupa] = 'NAMJEŠTAJ'

SQL returns 0 rows even though i only have 1 row in my whole table and that row has a [grupa] = 'NAMJEŠTAJ'

Upvotes: 3

Views: 1297

Answers (1)

Mitch Wheat
Mitch Wheat

Reputation: 300827

Unicode literal strings need to be prefixed with N:

SELECT TOP (1000) [name] 
FROM [mpnew].[dbo].[arts] 
WHERE [grupa] = N'NAMJEŠTAJ'
                ^

Upvotes: 8

Related Questions