|
Charles Wilt wrote:
I was thinking that basically, what you are looking for is equivalent sets....Eh, to some degree. I didn't read the whole article because I have no
Seems like that should have been done before, google turned up this:
http://searchoracle.techtarget.com/tip/0,289483,sid41_gci1224863_mem1,00.html
Looks like there's a handful of ways to do this.
particular desire to subscribe to an Oracle newsletter, but the first
option was a FULL OUTER JOIN. FOJ is expensive enough, but then you
still have to do that on every possible combination of master IDs. The
processing rises exponentially with the number of masters, and in
addition it rises arithmetically with the number of details.
Viable perhaps for files with thousands of records, not so much for
millions.
However, you could relatively quickly reduce the number of possibilities
with a CTE:
WITH possibles AS
(SELECT DISTINCT a.master AS master1, b.master AS master2
FROM detail a, detail b WHERE a.function = b.function)
That gives you POSSIBLES as the list of pairs of masters with at least
one function in common.
Another comparison would be comparing all masters with an equal number
of children. That also gives you a trimmed down list of possibles.
Then just do exception joins each way and include only those with no
exceptions.
Joe
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.