Missing null fields in query result
Posted: Thu 05 Mar 2015 09:59
Hi,
Queries containing constant fields in the select clause do not return fields if the constant is NULL. All NULL fields are stripped from the result set.
Example:
tbl is a table with several records
select null from tbl
select null, null from tbl
--> return nothing (no rows, no fields)
select 1, null from tbl
--> returns rows, but only 1 field containing the value 1
select 1, null, 2, null from tbl
--> returns only 2 fields containing 1 and 2
Environment:
Delphi 7
Oracle 11gR2, 12c
dbxoda (sql*net) 4.70, 6.3.6, 6.5.8
Queries containing constant fields in the select clause do not return fields if the constant is NULL. All NULL fields are stripped from the result set.
Example:
tbl is a table with several records
select null from tbl
select null, null from tbl
--> return nothing (no rows, no fields)
select 1, null from tbl
--> returns rows, but only 1 field containing the value 1
select 1, null, 2, null from tbl
--> returns only 2 fields containing 1 and 2
Environment:
Delphi 7
Oracle 11gR2, 12c
dbxoda (sql*net) 4.70, 6.3.6, 6.5.8