Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Null dates in a union query question
PMG wrote in message <3608873E.4372F939_at_2xtreme.net>...
>Can somebody tell me how to get around this problem:
>
>create or replace view x as
> select 'pete' NAME,
> null ADATE
> from dual
>union all
> select null NAME,
> sysdate ADATE
> from dual
create or replace view x as
select 'pete' NAME, to_date( null ) ADATE
select null NAME, sysdate ADATE
The same is for NUMBER. Oracle implicitly set datatype to VARCHAR2 (or CHAR?) to item 'NULL' in such SELECT list.
leon_at_grant.kharkov.ua Received on Wed Sep 23 1998 - 05:06:42 CDT