August 14, 2008 at 2:27 am
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
August 14, 2008 at 2:45 am
actually one of our java developers are trying to execute the proc, on our uk based server
August 14, 2008 at 4:00 am
Check the stored proc's code for collation related issues.
August 14, 2008 at 4:13 am
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
August 14, 2008 at 5:42 am
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
August 14, 2008 at 5:45 am
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