Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL Problem w/MINUS
Hi All,
I am using Oracle 8.1.6 on a Linux platform and I am finding unwanted results from a SQL statement that uses the MINUS clause.
select cust_nbr from customer where age >= 30
minus
select cust_nbr from order where amount >= 10
The customer table has about 14m rows and the order table has 60m rows.
I am trying to select all customers that have a single purchase of 10 or
more.
At the end I run reports on the result set and I get customers that are less
than 30
Questions
<1> Is there a better way write this select?
<2> Are there any problems with using the MINUS clause
<3> Are there any bugs related to SQL within Oracle for Linux
Thanks
Steve Fuller Received on Mon Sep 25 2000 - 16:58:47 CDT