Question of the Day
I am dealing with issues on my SQL Server 2022 instance related to collation. I have an instance collation of Latin1_General_CS_AS_KS_WS, but a database collation of Latin1_General_CI_AS.
I want to force a few queries to run with a specified collation by using code like this:
DECLARE @c VARCHAR(20) = 'Latin1_General_CI_AS'
SELECT p.PersonType,
p.Title,
p.LastName,
c.CustomerID,
c.AccountNumber
FROM Person.Person AS p
INNER JOIN Sales.Customer AS c
ON c.PersonID = p.BusinessEntityID
COLLATE @c
Will this solve my problem?
See possible answers