sqlplus 'set null'
794093Aug 27 2010 — edited Aug 27 2010Again, new to sqlplus and Oracle, so thanks in advance.
I am using 'set NULL "0"' to print a zero when I have a null value.
The problem I am having is that the "0" that is printing does not
seem to be behaving like the other column values (which are numbers).
set heading off
set echo on
set newpage 1
set pagesize 55
set linesize 66
column FW_STREAM_NAME FORMAT a20
column SUM(TOTAL_RECORDS) FORMAT 9,999 JUSTIFY RIGHT
--set NULL '0'
SELECT FW_STREAM_NAME, SUM(TOTAL_RECORDS) from BL_STATISTICS_FILE WHERE created_timestamp between
TO_DATE('20100826000000','yyyymmddhh24miss') AND
TO_DATE('20100826235900','yyyymmddhh24miss') GROUP BY FW_STREAM_NAME
and here is the output:
APPLES12345 2,810
ORANGES3456 36
BANANAS12456 16
PEARS6789 0
CHERRIES 131
Everything is lined up except my special column, where sqlplus has replace the null with
a "0" as I asked it to.
How can I get it to line up with the rest of the numerical column entries?
Thanks,
Mitch