为什么我在这个输出中得到整数(我期待 DECIMAL) 数据库风格是 Teradata 我做错了什么?
CASE WHEN sub_e.LSD IS NOT NULL THEN CAST(baba.amt AS DECIMAL(10,2))
ELSE 0
END
-
(
SUM(
CASE
WHEN sub_e.LSD IS NOT NULL
THEN ch.actv_amt * (1 + ch.tax_percent_rate/100)
ELSE 0
END
)
)
+
CASE WHEN
sub_e.LSD IS NOT NULL THEN COALESCE(sub_e.PWC, 0)
ELSE 0
END
AS ODTS,