Subject: RE: Identifying unique sets of combinations From: Date: Fri, 3 Jun 2011 13:43:19 -0400 List-archive: List-help: List-id: Midrange Systems Technical Discussion List-post: List-subscribe: , List-unsubscribe: ,

That's sounds like a lot of fun. Seriously. It's a nice puzzle.
But, I don't have an answer for you.

Paul Therrien
Andeco Software, LLC
932 Saint Johns Dr
Maryville, TN 37801
225-229-2491
paultherrien@xxxxxxxxxxxxxxxxxx
www.andecosoftware.com

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis
Sent: Friday, June 03, 2011 12:40 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Identifying unique sets of combinations

We have a table as part of our HR system that is used to categorize days
off. For example, "S" (for sick) is in the SCKAC, USEDS, VACCK and 14 other
categories (I know, I know). V(acation) is in 7 categories, and so on.
These things are categorized in such a way because they intersect so much.
For example, a Carry-over vacation day and a Vacation day each have the same
effect in terms of Vacation Balance, but very different effects when it
comes to calculating next year's new balance.

In all, there are 110 absence codes that are grouped into 55 different
categories. In an effort to simplify all of this, I've been asked to
identify categories that share common members, with no exceptions. (In
other words, if categories AAA, ABB and ACC all contain V and C, and none of
them contain anything else, they are exact duplicates.)

By the same token, If V and G are in 5 categories, but a sixth category
lacks G, the powers that be would like this noted also.

I'm sure there's a way to get to this answer and still maintain what's left
of my sanity (many of you realize that there's little left), but I have not
yet landed on it. I thought SQL might get me to the answer most readily,
but try as I might I haven't found a workable solution yet; my CTEs quickly
get too complex for me to follow. (See prior note on sanity.) Pivot table
doesn't seem quite right (though it may help); counts are not definitive
enough...

So I thought I'd come to this group; see if you've had a similar situation,
and might be willing to share how you arrived at a solution.

Thanks!
--
Sent from my Galaxy tablet phone with with K-9 Mail. Please excuse my
brevity.