Reputation:
Code:
SELECT
ta_name,
countt,
ta_unit,
ta_id_producer_goods
FROM (
SELECT ta.name AS ta_name,
ta.unit AS ta_unit,
ta.id_producer_goods AS ta_id_producer_goods,
count(*) over(partition by ta.name) as countt,
ROW_NUMBER() over(partition by ta.name order by getdate()) as r
FROM Table ta
WHERE id_city = '24'
AND id_firm = '22131'
AND id_service = '5'
) x
WHERE r=1
When I run the above query in SQL Server Management Studio, I get this result:
Why do I get results in bad encoding and how do I get the right encoding ?
Upvotes: 1
Views: 64
Reputation: 125
You can get the default collaction by:
SELECT SERVERPROPERTY('Collation')
Upvotes: 0