• SQLbeginner (10/7/2008)


    where specifically in the query should i use the Collate function?

    I already have it in the middle part of the query.

    Anywhere you're comparing or joining between the 2 databases. Think of it like converting 1 collation to the other. So if DB_A is Collation_A, and DB_B is Collation_B then your code will be:

    select DB_A.dbo.TableA, DB_B.dbo.TableB

    from DB_A.dbo.tableA TbA

    join DB_B.dbo.tableB TbB on TbA.FldA collate Collation_B = TbB.FldB

    That converts FldA to B's collation