Re: How to say it in SQL?
From: Christine <karistom_at_hotmail.com>
Date: 26 Nov 2003 23:25:51 -0800
Message-ID: <693b7163.0311262325.e3cd0f0_at_posting.google.com>
Date: 26 Nov 2003 23:25:51 -0800
Message-ID: <693b7163.0311262325.e3cd0f0_at_posting.google.com>
Here's the answer.
select A.RefTableID from
(SELECT RefTableID FROM b
WHERE RefClassID IN
(SELECT RefClassID FROM a WHERE RefObjectID=&1) ) A
group by A.RefTableID
having count(*) = (SELECT count(*) FROM a WHERE RefObjectID=&1)
;
RESULT:
2 -> 1
1 -> 1,3
Received on Thu Nov 27 2003 - 08:25:51 CET