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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL query for finding values that are not contained in a table

Re: SQL query for finding values that are not contained in a table

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 18 Oct 2005 16:01:41 -0700
Message-ID: <1129676497.881437@yasure>


dimitris_at_cs.umb.edu wrote:
> Hi,
>
> I was wondering if there is a simple way to write a sql query
> and do the following:
>
> Given a list of values eg ('a1', 'a2', 'a3', ...) ,which could
> be included in the query, we would like to look in some
> table column (eg col1 of tab1) and select the values that are
> not included in the column but they are included in our list.
>
> One way would be to create an additional table, store the values we
> would like to check and then write a query to access both tables,
> but I was wondering if we could do this in a simpler way preferably
> with a single sql statement.
>
> Thanks.
>
> D.

Another way would be to write a pipelined table function.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Oct 18 2005 - 18:01:41 CDT

Original text of this message

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