I think this is how it should look:
SELECT St_Text COLLATE SQL_Latin1_General_CP1_CS_AS, count(*) as Counter
FROM tblSTBackup
GROUP BY St_Text COLLATE SQL_Latin1_General_CP1_CS_AS
HAVING count(*) > 1
Domanda
How can I add COLLATION to the following query....
This Collation clause = COLLATE Latin1_General_CS_AS
I only need to count the St_Text field if it exactly matches.
SELECT St_Text, count(*) as Counter
FROM tblSTBackup
GROUP BY St_Text
HAVING count(*) > 1
I have tried to add the collation to the GROUP BY.
Soluzione
I think this is how it should look:
SELECT St_Text COLLATE SQL_Latin1_General_CP1_CS_AS, count(*) as Counter
FROM tblSTBackup
GROUP BY St_Text COLLATE SQL_Latin1_General_CP1_CS_AS
HAVING count(*) > 1