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: MINUS operator giving different results?

Re: MINUS operator giving different results?

From: Patrick Suppes <psuppes_at_lucent.com>
Date: Thu, 22 Apr 1999 13:54:55 -0600
Message-ID: <371F7E8F.26941C87@lucent.com>


The code you specified generates a list of keys that has the XBRCOUNT type, then removes the MANCOUNT set from that list.

If you switch the MANCOUNT select and the XBRCOUNT select, you should get what you apparently want (MANCOUNTS without XBRCOUNTS).

Patrick Suppes

lshea_at_earthling.net wrote:

> I run this SQL various times:
>
> select distinct hcode, storenum, regnum,
> transdate from sa_counts where
> batchno = 300 and counttype = 'XBRCOUNT'
> MINUS
> select distinct hcode, storenum, regnum,
> transdate from sa_counts where
> batchno = 300 and counttype = 'MANCOUNT';
>
> hoping to get back the 6 records that have a MANCOUNT entry but no XBRCOUNT
> entry. Sometimes it comes back with 6 records, sometimes it comes back with 0
> records!! Completely randomly!! There are other columns in the table, and
> multiple entries for each hcode/store/reg/date combo. Any thoughts why it
> would randomly choose an answer?
>
> Lisa, lshea_at_earthling.net
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Thu Apr 22 1999 - 14:54:55 CDT

Original text of this message

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