• You need to make sure that both the right and the left are using the some collation when comparing. Here is an example that works, because the column on the right is converted to the collation of the left column by using the collate clause.

    create table #a (char_set1 varchar(50) collate Latin1_General_CI_AS)

    create table #b(char_set2 varchar(50) collate Latin1_General_BIN)

    insert into #a values ('collate')

    insert into #a values ('collate a')

    insert into #b values ('collate')

    insert into #b values ('collate b')

    select * from #a, #b

    where char_set1 <> char_set2 collate Latin1_general_CI_AS

    drop table #a, #b

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP