0
我有這個疑問:如果我沒有列命運,如何避免sql server中的算術溢出?
SELECT
client,
month1,
month2,
month3,
month4,
month5,
month6,
(isnull(month1, 0) +
isnull(month2, 0) +
isnull(month3, 0) +
isnull(month4, 0) +
isnull(month5, 0) +
isnull(month6, 0)) /6 as prom
FROM client_total_sales
月份可以有NULL值。
我試了一輪,轉換數據類型,但問題仍然存在。
SQL Server Management Studio在查詢加載期間顯示錯誤,我的意思是在錯誤出現之前查看一些結果。
錯誤消息: 男士。 8115,Level 16,State 2,Line 1 Error de desbordamientoaritmético(算術溢出錯誤)al convertir expression al tipo de datos int。
你在問什麼?如何避免SSMS崩潰?你有沒有嘗試過多次?結果應該輸出多少行?你現在讀什麼關於SSMS崩潰?與此同時,看[這裏](http://sqlblog.com/blogs/aaron_bertrand/archive/2009/06/25/what-to-do-when-management-studio-hangs.aspx),也許它有幫助。 – OzrenTkalcecKrznaric
我的意思是在錯誤出來之前看到一些結果。 –
client_total_sales是一個視圖嗎? – usr