Hello,
I am on Oracle 9i and I am trying to format the output in a query as follows:
SELECT DISTINCT
SUM(CASE
WHEN b.year = '2005' THEN
to_char(b.ytd_amount, 9999999999999999999999.99')
ELSE
to_char(0, '99.99')
END) AS Y2005
FROM table b, table a
The result set does not seem to be formatting the ytd_amount because a 0 will show up as 0 and not 0.00 and 150 will show up as 150 and not 150.00.
I am on Oracle 9i and I am trying to format the output in a query as follows:
SELECT DISTINCT
SUM(CASE
WHEN b.year = '2005' THEN
to_char(b.ytd_amount, 9999999999999999999999.99')
ELSE
to_char(0, '99.99')
END) AS Y2005
FROM table b, table a
The result set does not seem to be formatting the ytd_amount because a 0 will show up as 0 and not 0.00 and 150 will show up as 150 and not 150.00.