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: SQL Query Help please

Re: SQL Query Help please

From: Wil Rodriguez <wilrod_at_nospam.rocketmail.com>
Date: Sun, 18 Oct 1998 12:45:00 -0700
Message-ID: <362A453B.D4054306@nospam.rocketmail.com>


You might need to alias your tables:

SELECT a.account_no
FROM table1 a
WHERE a.account_no NOT IN (SELECT b.account_no

                                                   FROM table2 b)
/

Wil

MUJAHID HAMID wrote:

> Dear All,
>
> I have the following select:
>
> Select account_no from table1
> where account_no not in (select account_no from table2).
>
> I am trying to say that give me the account_no's in table1 that are not in
> table2.
>
> In the result I do not get any rows back and I know for a fact that there
> are rows in table1 that are not in table2.
> (Table2 has more rows than table1)
>
> Thanks in advance
> mujahid_at_pharmco.demon.co.uk
Received on Sun Oct 18 1998 - 14:45:00 CDT

Original text of this message

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