SQL 2005 Sort Order Problem

  • I am setting up a SQL 2005 Server and restoring databases from a SQL 2000 install.

    I have restore the files fine, through detach and attach.

    I am getting an error on a query.

    (6062 row(s) affected)

    Msg 468, Level 16, State 9, Line 15

    Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

    The SQL 2000 sort order is the "SQL_Latin1_General_CP1_CI_AS" 

    From the sp_helpsort command

    Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data

    I can't find that option in sql collations when I am installing on SQL 2005.

    I am doing it to a new server and can't just upgrade the old one.

    Thanks,

    Don

  • I've run into this error before while using linked servers. Are you querying a linked server at all? You may want to check the settings for "Use Remote Collation".

  • No I'm not using a linked server.

    Thanks,

    DOn

  • Can you modify the query? Try to cast the string columns you select to the new collation.

    Cast

    (myTable.column1 COLLATE Latin1_General_CI_AS As Varchar(40))

  • What's the server's collation and what's the database's collation?

    You can get these errors wen those two are different and a temp table is used, or a query uses a worktable in tempdb.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply