countrymeister
asked on
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
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
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.
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.t able_name
ALTER COLUMN column_name data_type()
COLLATE collation_name
will be the name of the collation of the old table.column
ALTER TABLE database_name.schemaname.t
ALTER COLUMN column_name data_type()
COLLATE collation_name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dropped the new column that was created