Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Null dates in a union query question

Re: Null dates in a union query question

From: Grinberg L. <leon_at_grant.kharkov.ua>
Date: Wed, 23 Sep 1998 13:06:42 +0300
Message-ID: <6uagpq$4u5@grant.grant.UUCP>

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

   from dual
union all
   select null       NAME,
   sysdate         ADATE

 from dual;

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US