Re: What is wrong with this query?
From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1995/05/15
Message-ID: <3p8h4p$421_at_ixnews3.ix.netcom.com>#1/1
Date: 1995/05/15
Message-ID: <3p8h4p$421_at_ixnews3.ix.netcom.com>#1/1
In <3p8bd4$nj2_at_news3.digex.net> joe_at_access1.digex.net (Joe Nardone)
writes:
>
>
>As part of an error trapping routine, I'm having a problem with
>what should be a fairly simple query.
>
>First, the query:
>
>select bill_acct_id from transmission
>where bill_acct_id not in (select acct_id from convert_acct);
>
>Basically, I want a list of all 'bill_acct_id's in the 'transmission'
>table that are not in the conversion table (convert_acct). I know
>for a fact that there are bill_acct_id's not in the conversion
>table, yet the query returns no rows. Why?
Two suggestions...
- Be sure that the rows that you think are in the conversion table
have been committed to the database.
- This select might be a bit faster...
select bill_acct_id from transmission where not exists (select * from convert_acct where acct_id = transmission.bill_acct_id);
--Received on Mon May 15 1995 - 00:00:00 CEST
><> Chuck Hamilton <><
><> chuckh_at_ix.netcom.com <><