I am trying to summarize multiple bill amounts and I am getting the right numbers but the decimal is in the wrong spot. When I use this statement to get bill amounts for a case, it returns the correct amounts:
BILL_TOTAL= sum(CASE [TRAN_TYPE] WHEN 'BL' THEN([FEES_AMT]+[HARD_AMT]+[SOFT_AMT])*[SIGN] WHEN 'BLX' THEN([FEES_AMT]+[HARD_AMT]+[SOFT_AMT])*[SIGN] ELSE 0 end)
Results: 3475.18000000 and 29740.70000000
However, when I sum those 2 amounts by client, I get 332158.80000000 instead of 33215.88000000. All the fields being added in my statement are EXPCURRENCY(decimal(25,10)),null)
How do I fix this??
BILL_TOTAL= sum(CASE [TRAN_TYPE] WHEN 'BL' THEN([FEES_AMT]+[HARD_AMT]+[SOFT_AMT])*[SIGN] WHEN 'BLX' THEN([FEES_AMT]+[HARD_AMT]+[SOFT_AMT])*[SIGN] ELSE 0 end)
Results: 3475.18000000 and 29740.70000000
However, when I sum those 2 amounts by client, I get 332158.80000000 instead of 33215.88000000. All the fields being added in my statement are EXPCURRENCY(decimal(25,10)),null)
How do I fix this??