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: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 22 Apr 1999 20:43:34 +0100
Message-ID: <924810438.20206.0.nnrp-03.9e984b29@news.demon.co.uk>


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

Original text of this message

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