Subject | SQL query |
---|---|
Author | ibfa2000 |
Post date | 2002-04-26T08:41:59Z |
Hi,
Let be the following tables:
SET SET_ITEM ITEM
=== ======== ====
SET_ID SET_ID ITEM_ID
NAME ITEM_ID NAME
QUANTITY
For a given SET_ID (let's call it S), I would like to create 2
queries:
- a query that returns all sets (i.e. all SET_ID) that have the same
content as S (i.e., that have exactly the same detail records in
SET_ITEM)
- a query that returns all super-sets of S (i.e., all sets containing
the same detail records in SET_ITEM, or more)
Could anyone give me some hint to help me write these queries?
Thanks,
Fabrice
Let be the following tables:
SET SET_ITEM ITEM
=== ======== ====
SET_ID SET_ID ITEM_ID
NAME ITEM_ID NAME
QUANTITY
For a given SET_ID (let's call it S), I would like to create 2
queries:
- a query that returns all sets (i.e. all SET_ID) that have the same
content as S (i.e., that have exactly the same detail records in
SET_ITEM)
- a query that returns all super-sets of S (i.e., all sets containing
the same detail records in SET_ITEM, or more)
Could anyone give me some hint to help me write these queries?
Thanks,
Fabrice