collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation?

Hi - I need some urgent help please - I know why the DB is causing the above error - all I need to do is run a select statement to get the value I require. I've written the following statement but I'm not sure where to enter the collation clause? In the select statement or in the join clause??

Please assist - Below is my script. Thanks in advance.









from StkItem HOS

right join [DB CT].dbo.StkItem CTS

on HOS.Code = CTS.Code

where CTS.Code is not null

and HOS.Code is null



Hi - I'm using Microsoft SQL2008 R2.

2 Answers

  • 8 years ago
    Favorite Answer

    on HOS.Code = CTS.Code

    Compare collation of these columns and do them equal.

    Or try this

    on HOS.Code = CTS.Code collate Latin1_General_CI_AS


    on HOS.Code collate Latin1_General_CI_AS = CTS.Code

  • Rami
    Lv 5
    8 years ago

    well i don't know what DBMs are you using

    but if mysql

    do this

    where field1 like field2 collation "same if field 1"

Still have questions? Get your answers by asking now.