2012-06-30 50 views
0

這是奇怪的錯誤我在存儲過程中面對的,SQL Server 2008中的排序規則衝突

無法解析「Latin1_General_CI_AI」 並在等於操作規則「SQL_Latin1_General_CP1_CI_AS」之間的排序規則衝突。嚴重性 16狀態9 關於調試我看到問題出在兩個表之間的連接中,一個表由一個臨時表填充。奇怪的是這個,我沒有得到的錯誤在我的測試環境,但現場生產服務器上該錯誤出現

花了一段時間後發現,工作,所以我回答我的問題,現在我編輯這一個解決方案問題,其他用戶可以更好地瞭解這個問題。

+3

顯示一些代碼。你使用變量還是參數(例如以'@開頭的東西)? SQL Server實例上的默認排序規則是什麼? – Lucero

+0

感謝球員的反對票,以及我得到了我的問題的解決方案,問題是因爲臨時數據庫默認排序規則類型和我的服務器排序規則類型是不同的。 – Buzz

+0

將其添加爲答案。 – Pankaj

回答

2
i am getting the change to answer my own question 
well the problem was related to collation type of databases, 
in my proc i was useing temp tables by "create table #temptable" , 
now by some searching i found that #temptable is having the collation type of temp database which is different from my database, 
after changing the script to "select * into #temptable" ,I got that now #temptable is having same the collation as of my database, so that's how issue get resolved. 
not sure this is the only reason behind the problem but it resolve my issue. 
相關問題