Re: UNION and 'not found' exc.

From: N Prabhakar <N_Prabhakar_at_Socgen-Crosby.com>
Date: 1996/11/22
Message-ID: <573lcp$eph_at_newton.pacific.net.sg>#1/1


rashid_at_rk.wbs.com (Rashid Karimov) writes: > If I'm using something like
>
> select part from t1
> UNION
> select part from t2
>
>
> and say part was only found in one of the tables,
> will ORACLE throw 'not found' exception ? I want
> to use cursor declared similar to the SQL stmt above
> and naturally wondering if I should haunt for the exception ?
>
> In this particular case I want to ignore not found exc. if
> it happens, but down the code it begins to matter ... so should
> I wrap the first section of code which will open() and fetch()
> in its own begin ... end with separate exception handler ?
>
> E-mail copy of answer, if any, will be appreciated :)
>
> Rashid.
>
>
> --

Hi there,

Only when both the selects does not retrieve any rows, you will get no_data_found (1403). Otherwise it will retrieve the rows.

Regards

N.Prabhakar Received on Fri Nov 22 1996 - 00:00:00 CET

Original text of this message