Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: MINUS operator giving different results?
Are you sure you always execute the two parts
the same way round - the sample you supply
will show rows where there is an XBRCOUNT
but no MANCOUNT, not the 'MANCOUNT'
with no XBRCOUNT that you want.
If you are swapping the two parts around
randomly, then your answer could jump
back from fore between 0 and 6
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
lshea_at_earthling.net wrote in message <7fnsi3$vt$1_at_nnrp1.dejanews.com>...
>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!!
Received on Thu Apr 22 1999 - 14:43:34 CDT
![]() |
![]() |