What purpose would the following function be used for in SQL when specifying fields for a left outer join;
y.[ACCOUNT_ID] COLLATE Modern_Spanish_CI_AS= z.[ACCOUNT_ID] COLLATE Modern_Spanish_CI_AS
What purpose would the following function be used for in SQL when specifying fields for a left outer join;
y.[ACCOUNT_ID] COLLATE Modern_Spanish_CI_AS= z.[ACCOUNT_ID] COLLATE Modern_Spanish_CI_AS
A collation defines the way strings are sorted and compared.
COLLATE Modern_Spanish_CI_AS
refers to the Modern Spanish collation, case-insensitive, accent-sensitiv, i.e. case is ignored, but accents are not ignored.
I don't know your data, but having an accent-sensitive Account_ID
sounds "interesting" ;)
On the other hand, if the two Account_ID
columns are defined with different collations, or the statement refers to temp tables, enforcing a common collation is reasonable, or even necessary, if the database-level or column-level collation deviates from the server-level collation.