Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> MINUS operator giving different results?
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:16:23 CDT
![]() |
![]() |