I have a piece of code in my stored procedure as below -
update tblexpwitretrocmdocs set sCheckedOut = A.sEditor, idone = 0
from #tblDocs A
JOIN tblexpwitretrocmdocs B ON A.SID = B.SID
where A.iDocumentTypeId in (16,17,13,11)
and A.sid not in (select SID COLLATE SQL_AltDiction_CP850_CI_AS from tblexpwitdocumentgeneral)
I am getting the error "Cannot resolve the collation conflict between "SQL_AltDiction_CP850_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation." for the first line of code.
The column - sCheckedOut in table - tblexpwitretrocmdocs has collation SQL_AltDiction_CP850_CI_AS. So to make the column - sEditor compatible to it, I defined the temp table as below -
CREATE TABLE #tblDocs(
iId INT IDENTITY (1,1),
SID NVARCHAR(50) COLLATE SQL_AltDiction_CP850_CI_AS,
iDocumentTypeId INT,
sType NVARCHAR(200),
sEditor NVARCHAR(50) COLLATE SQL_AltDiction_CP850_CI_AS
)
Still I am getting the same error. Please help me resolve this.