SQL Server error

  • im getting this error when trying to execute a stored procedure, any advice?

    com.microsoft.sqlserver.jdbc.SQLServerException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_CP850_BIN" in the equal to operation

  • actually one of our java developers are trying to execute the proc, on our uk based server

  • Check the stored proc's code for collation related issues.

  • Check the collation between your database and TempDB. This problem also kicks-in when creating temporary objects

    Wilfred
    The best things in life are the simple things

  • If the stored procedure is performing a join between any two databases with different collations on certain data types you'll get this issue. You can force it to try and use a single collation in the join by using the COLLATE statement. e.g.

    SELECT * FROM

    Database1.dbo.Table1 A

    JOIN

    Database2.dbo.Table2 B

    ON A.Reference = B.Reference COLLATE SQL_Latin1_General_CP1_CI_AS

    I'd check your results carefully though!

    HTH

    Adam

  • You also may have columns inside tables with different collation settings. Check that.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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