我想獲得價值小數在此查詢,但無法得到我收到NULL值如何得到這個十進制值,而不是空
SELECT CAST(CAST(CAST(SUM(CAST(0 AS INT)) AS DECIMAL(10, 2)) * 100
/CAST(NULLIF(SUM(CAST(0 AS INT))
+ SUM(CAST(0 AS INT)) +
SUM(CAST(0 AS INT)), 0)
AS DECIMAL(10, 2)) AS DECIMAL(10, 2)) AS DECIMAL)
如何讓輸出
0.00
,而不是空在此查詢
這個查詢的目的是什麼?你可以發佈你的*真實*問題嗎? –