Bambi,
I don't think there's a bug here.
Junk contains A,B,C.
Junk2 contains A,B,C,X.
Junk2 minus junk will yield X.
Junk minus junk2 will yield 'no rows'.
So, if you select from the cartesian join of the two inlines, and one of the inlines
has no rows, then the output will have no rows. In o
No problem. You are trying to create a cartesian product of the two queries.
Now, what is a Cartesian product of the two sets, A and B? It is a set of
all ordered pairs (a,b) where a is element of A and b is element of B.
The result of your firs query is an ampty set:
SQL> select * from junk minu
Bellow, Bambi wrote:
SQL> select a.*, b.*
2 from
3 ( select * from junk minus select * from junk2 ) a,
4 ( select * from junk2 minus select * from junk ) b;
no rows selected
SELECT a.*
, b.*
FROM (SELECT dummy x FROM dual WHERE 1 = 2) a
, (SELECT dummy x FROM dual) b
WHERE b.x
Thank you Carol!
Bambi.
-Original Message-
Sent: Friday, December 12, 2003 2:44 PM
To: Multiple recipients of list ORACLE-L
Junk minus junk2 results in no rows, and when you do the implied
cartesian join between view a and view b, joining no rows with one row
gives no rows.
Makes sense
That's what I was thinking, too. I tried it on 8.1.7.4 and it works the
same way, as I expected. You would need an outer join to get something
back.
Scott Canaan ([EMAIL PROTECTED])
(585) 475-7886
"Life is like a sewer, what you get out of it depends on what you put
into it." - Tom Lehrer.
---
Junk minus junk2 results in no rows, and when you do the implied
cartesian join between view a and view b, joining no rows with one row
gives no rows.
Makes sense to me.
Carol Bristow
DPRA Inc.
1300 N 17th St Suite 950
Rosslyn, VA 22209
Work: 703-841-8025
Fax: 703-524-9415
-Original Message