Friday, July 6, 2012

Cannot resolve collation conflict for column 1 in SELECT statement

“Cannot resolve collation conflict for column 1 in SELECT statement.”
I got this error when I was trying to run a script. This is basically because the column collation has been set at a different level than the server.
eg: SELECT FirstName +' '+LastName FROM dbo.Students
This could be rectified by specifying the column collation along with the Select statement.
eg: SELECT FirstName +' '+ LastName 
COLLATE SQL_Latin1_General_CP1_CI_AI LastName 
FROM dbo.Students
MvM

No comments:

Post a Comment