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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Select a-row alternative from several tables one-by-one until found

Re: Select a-row alternative from several tables one-by-one until found

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: 2000/05/25
Message-ID: <cfiqis8kltp0p86khtt88vnviv7tppp399@4ax.com>#1/1

You could write a UNION query, but all the queries that you union together would be executed. It wouldn't stop when just one row was found. You could also write a stored PL/SQl function that executed several queries in succession, and that stopped when one of those returned a row. I don't think you can do what you want with just one SELECT statement.

Jonathan



jonathan_at_gennick.com
http://gennick.com
Brighten the Corner Where You Are

On Thu, 25 May 2000 14:19:33 +0800, Rayfil Cheung <rayfil_at_forward-hk.com> wrote:

>Can some help me how write a single SQL or sorts of SQL statements that
>can select a row (value) alternative from several tables one by one
>until the row (value) is found. Thanks in advance.
>
Received on Thu May 25 2000 - 00:00:00 CDT

Original text of this message

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