collation

  • Server: Msg 468, Level 16, State 9, Procedure SP_TRANS_DECAISSEMENT_EFFECTIF, Line 26

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

  • Sounds like you have a collation difference between two tables or columns. Most likely in a join somewhere.

    You can force the collation in the comparison like this.

    table1.Column COLLATE DATABASE_DEFAULT = table2.Column COLLATE DATABASE_DEFAULT

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • eboucicaut (7/13/2012)


    Server: Msg 468, Level 16, State 9, Procedure SP_TRANS_DECAISSEMENT_EFFECTIF, Line 26

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

    somehwere inside your procedure, you are joining or comparing two columns.

    to resolve the issue, you will have to explicitly set the collation, like this, for example:

    SELECT

    *

    FROM Table1

    INNER JOIN Table2 ON Table1.ID = Table2.ID

    WHERE Table1.Column1

    COLLATE SQL_Latin1_General_CP1_CI_AS

    = Table2.OtherColumn

    COLLATE SQL_Latin1_General_CP1_CI_AS

    like the error message says, if you go directly to line 26 of that procedure, you will see the actual comparison that is failing due to collation.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • THANK YOU SO MUCH

  • THANK YOU SO MUCH

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

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