Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re:SQL Question-Please help (follow up)

Re:SQL Question-Please help (follow up)

From: Noel <noel_mckinney_at_ieee.org>
Date: Fri, 10 Nov 2000 21:24:28 -0600
Message-ID: <8uie16$kg$1@slb7.atl.mindspring.net>

Hubert,

Following up my own reply (had to leave for dinner) on what I said earlier about dividing the two tables, if your question involves the SQL statement for your query, it would look like this:

SELECT attr1
FROM b b1
WHERE NOT EXISTS
  (SELECT *
   FROM a
   WHERE NOT EXISTS

     (SELECT *
      FROM    b b2
      WHERE  b1.attr1 = b2.attr1
      AND       a.attr2  = b2.attr2));

You can see now why 'not' appears twice in "select attr1 from B such that there does not exist an attr2 in A that attr1 in B does not have."

Noel Received on Fri Nov 10 2000 - 21:24:28 CST

Original text of this message

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