錯誤訊息:
Chinese_Taiwan_Stroke_BIN 與 Chinese_Taiwan_Stroke_CI_AS 之間的定序衝突
或是
Cannot resolve the collation conflict between "Chinese_Taiwan_Stroke_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation. [SQLSTATE 42000] (Error 468). The step failed
解決方式:
1. 有where時
WHERE A.A = M.M
改成
WHERE A.A COLLATE Chinese_Taiwan_Stroke_BIN = M.M COLLATE Chinese_Taiwan_Stroke_BIN
2. 有UNION時
SELECT ie FROM A WHERE code LIKE '123%' GROUP BY ie
UNION
SELECT ie FROM B WHERE code LIKE '123%' GROUP BY ie ORDER BY ie
改成
SELECT ie COLLATE Chinese_Taiwan_Stroke_BIN FROM A WHERE code LIKE '123%' GROUP BY ie
UNION
SELECT ie FROM B WHERE code LIKE '123%' GROUP BY ie ORDER BY ie COLLATE Chinese_Taiwan_Stroke_BIN
沒有留言:
張貼留言