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: SELECT...INTO and UNION query

Re: SELECT...INTO and UNION query

From: Joey Ogalesco <joeyco_at_hotmail.com>
Date: Sun, 1 Aug 1999 12:45:43 -0400
Message-ID: <7o1tmn$qfl$1@bgtnsc02.worldnet.att.net>


try to use the NVL functions.....

e.g.

select E, B, C
into var1, var2, var3
from

    (select nvl(A,' ') as E, B,C
    from .....
    where....
    union all
    select nvl(D,' ') as E, B,C
    from .....
    where....);

Mike Heisz wrote in message ...
>I am having trouble with the fillowing type of statement
>
>select E, B, C
>into var1, var2, var3
>from
> (select A as E, B,C
> from .....
> where....
> union all
> select D as E, B,C
> from .....
> where....);
>
>For some reason var1 is being set to null but var2 and var3 are getting the
>correct values.
>
>It works if I use the following query but I would prefer not to do this:
>
>select *
>into var1, var2, var3
>from
> (select A, B,C
> from .....
> where....
> union all
> select D, B,C
> from .....
> where....);
>
>Any help would be appreciated,
>
>Thanks
>Mike
>
>
Received on Sun Aug 01 1999 - 11:45:43 CDT

Original text of this message

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