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: Why doesnt this query work?? Makes no sense????

Re: Why doesnt this query work?? Makes no sense????

From: Ethan Post <epost1_at_my-deja.com>
Date: 2000/06/28
Message-ID: <8jbgtk$897$1@nnrp1.deja.com>#1/1

Do a descibe on the tables for us, how many rows in each?

desc table A;
desc table B;
select count(*) from table A;
select count(*) from table B;

What indexes are on the table?

You could also use a minus of not exists statement to speed things up.

-Ethan
http://www.freetechnicaltraining.com
http://www.gnumetrics.com

In article <3959413e.5520978_at_news.mindspring.com>,   nitefrog_at_yahoo.com wrote:
> Why does this query not return any rows? I cant figure this one out?
> Also I want to note that the tablespaces are full or very close to
> being according to the storage manager. Will this cause the problem?
> Also this query takes for ever to run as well. Any help is greatly
> appreciated.
>
> select patientid
> from B
> where patientid not in (select patientid from A);
>
> TABLE A - patientid
> -------
> 1
> 2
> 3
> 4
>
> TABLE B - patientid
> -------
> 1
> 2
> 3
> 4
> 5
> 6
> 7
>
> Thanks,
>
> Kev.-
>

--
http://www.freetechnicaltraining.com/home/ethan


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Jun 28 2000 - 00:00:00 CDT

Original text of this message

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