'CASE statement in a temp table to format a decimal value SQL --> Syntax error
I am trying to use a case select for a $ pay field. If the field is 0.00 then i want the decimal formatted as a blank fill of length 10 0's else give me the decimal value in a length of 10.
This is what I have right now but I have a syntax error.
,(CASE
WHEN REGULAR_PAY_AMOUNT = '0.00' THEN format(REGULAR_PAY_AMOUNT, '0000000000')
ELSE format(REGULAR_PAY_AMOUNT, '0000000.00')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
