Oracle 8.0.5.0
The following code fails when I return a NULL as c2 in the first part of the union, but is OK if the date is used.
Seems very odd to me!
Is this correct (hopefully not.....)
The following code fails when I return a NULL as c2 in the first part of the union, but is OK if the date is used.
Seems very odd to me!
Is this correct (hopefully not.....)
Code:
select c1,
c2
from(
select t1.wip_due_date as c1,
null as c2 --to_date('01/01/2002', 'dd/mm/yyyy') as c2
from visib.mm_mrp_tmp t1
where t1.due_date is null
and t1.wip_due_date is not null
union all
select to_date('01/01/2002', 'dd/mm/yyyy'),
t1.prom
from visib.mm_mrp_tmp t1
where t1.due_date is null
and t1.prom is not null
and to_char(t1.prom,'dd/mm/yyyy') = '00/00/0000'
and t1.prom < '01 jan 3999'
);