Re: Subquery not returning results

From: ddf <oratune_at_msn.com>
Date: Wed, 8 Apr 2009 08:48:08 -0700 (PDT)
Message-ID: <3db57dc7-63da-4b56-8345-9525ad7dd24e_at_a7g2000yqk.googlegroups.com>



On Apr 8, 10:05 am, Sashi <small..._at_gmail.com> wrote:
> Hi All,
>
> I have a simple subquery:
>
> select ckt_id, charges
> from table A
> where ckt_id not in (select distinct ckt_id from B) and charges > 0
>
> I know of at least one record in A whose ckt_id is not present in
> table B and charges > 0 which is not being returned.
>
> Table A has about 15000 records and B has about 50000 records.
>
> What am I missing here?
>
> Thanks in advance,
> ZSashi

We don't know because you haven't posted:

The Oracle release you're using
The DDL for the tables involved
Sample data for these tables

Provide the missing information and maybe someone can assist you.

David Fitzjarrell Received on Wed Apr 08 2009 - 10:48:08 CDT

Original text of this message