Collation error on adding of a new column

One of our team members added a new column to the table tblOrders, now we get an collation error on a select condition where there is a JOIN with another table

This was the change that was made
exec sp_repladdcolumn 'tblOrders',  'orderregion',        'varchar(60)      NULL'

exec sp_recompile tblOrders

Not sure what is the reason this is occuring, and how do we fix it
Who is Participating?
countrymeisterAuthor Commented:
I am not using the new column at all, in this particular stored procedure, this is an existing stored procedure, so now it fails with this database change
exec sp_repladdcolumn 'tblOrders',  'orderregion',        'varchar(60)      NULL'

with the collation error
lcohanDatabase AnalystCommented:
You will need to check the collation on the older existing table and issue an ALTER TABLE ALTER COLUMN statement on the newly added column to match the other table column collation.
lcohanDatabase AnalystCommented:
It will be a statement like below that you need to write and execute in SQL where collation_name
will be the name of the collation of the old table.column

ALTER TABLE database_name.schemaname.table_name
    ALTER COLUMN column_name data_type()
        COLLATE collation_name
countrymeisterAuthor Commented:
dropped the new column that was created
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.