Print Thread
Suppression of NULL records?
#60831 12/16/19 11:30 AM
Joined: Feb 2003
Posts: 392
The Netherlands
patch Offline OP
Member
OP Offline
Member
Joined: Feb 2003
Posts: 392
The Netherlands
Is there a setting I am missing that suppresses records with just NULL values?
Check this script:
prompt This shows 3 records
with data as (select null c1, null c2 from dual union all
select 1 , null from dual union all
select null , 2 from dual union all
select 1 , 2 from dual
)
select *
from data
/
prompt This shows 4 records
with data as (select null c1, null c2 from dual union all
select 1 , null from dual union all
select null , 2 from dual union all
select 1 , 2 from dual
)
select nvl(c1, -1) c1
, nvl(c2, -1) c2
from data
/

Or have I stumbled upon a bug?!?

Re: Suppression of NULL records?
patch #60833 12/16/19 02:36 PM
Joined: Jun 2015
Posts: 72
Russia
L
Member
Offline
Member
L
Joined: Jun 2015
Posts: 72
Russia
Both variants show me 4 records.
13.0.6.1911
Oracle 12.2.0.1.0

Re: Suppression of NULL records?
lost #60834 12/16/19 02:38 PM
Joined: Jun 2015
Posts: 72
Russia
L
Member
Offline
Member
L
Joined: Jun 2015
Posts: 72
Russia
Oops! I have mistaken. You're right: in Command window - 3 records for the 1st query.

Re: Suppression of NULL records?
patch #60840 12/17/19 04:45 PM
Joined: Aug 2011
Posts: 339
T
Member
Offline
Member
T
Joined: Aug 2011
Posts: 339
Yep, it seems to be a bug.

Re: Suppression of NULL records?
T-Gergely #60841 12/17/19 07:01 PM
Joined: Jul 2004
Posts: 592
W
Member
Offline
Member
W
Joined: Jul 2004
Posts: 592
It looks like NULL rows aren't displayed in the command window. Both of the following give the same result:
Code
select null from dual where 1=1;
select null from dual where 1=2;

Re: Suppression of NULL records?
Worker #60843 12/18/19 10:16 AM
Joined: Aug 1999
Posts: 22,211
Member
Offline
Member
Joined: Aug 1999
Posts: 22,211
This does indeed not seem quite right. We'll fix it.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.054s Queries: 15 (0.024s) Memory: 2.5165 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-07 09:44:34 UTC
Valid HTML 5 and Valid CSS