SELECT CASE WHEN SUM(Amount) > 0 THEN CONCAT(CAST((SUM(Amount) AS VARCHAR(20) ) , ' Cr')
WHEN SUM(Amount) < 0 THEN CONCAT(CAST(ABS(SUM(Amount)) AS VARCHAR(20) ) , ' Dr')
ELSE '0.00'
END
FROM amount_transactions
WHERE Account_ID = 1 ;
这给了我一个错误。语法无效。