Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> what does decode(dual.dummy(+),'X',NULL,NULL) do exactly?
Can somebody help explain why this happens:
SVRMGR> select count(*) from ar_trx_header; COUNT(*)
929
1 row selected.
SVRMGR> select count(*) from ar_trx_header a, dual b where a.artrxhdridx =
decode(b.dummy(+),'X',NULL,NULL);
COUNT(*)
929
1 row selected.
SVRMGR> select count(*) from ar_trx_header a, dual b where a.artrxhdridx =
NULL;
COUNT(*)
0
1 row selected.
SVRMGR> select count(*) from ar_trx_header a, dual b where a.artrxhdridx =
decode(b.dummy,'X',NULL,NULL);
COUNT(*)
0
1 row selected.
..one would think that the DECODE(b.dummy(+)..) would always attempt to join the artrxhdridx to a NULL, which would always return zero rows.
Thanks in advance.
--steve Received on Thu Apr 25 2002 - 10:22:44 CDT