Trying to build a dynamic "Group" table.
Have the following Tables:
Collateral (Table)
CollID
CollName
Account (Table)
AcctID
AcctName
CollateralAccount (Table)
CollID
AcctID
Need to generate a 4th table:
Group (Table)
GroupID
AcctID
What I need to do is setup "Groups" of accounts that have any collateral in common.
Could be cases where 2 or more accounts share same CollID links, but then a 3rd account shares a separate CollID with only one of the original 2 accounts. I'd still consider all 3 accounts being in the same "Group". So at the end of the day, an AcctID can only be a member of one "Group".
Have been researching this for some time and just can't seem to get any momentum.
Sample Data:
Collateral (Table)
CollID CollName
1 CollItemA
2 CollItemB
3 CollItemC
4 CollItemD
5 CollItemE
6 CollItemF
Account (Table)
AcctID AcctName
1 AcctA
2 AcctB
3 AcctC
4 AcctD
5 AcctE
6 AcctF
7 AcctG
8 AcctH
CollateralAccount (Table)
CollID AcctID
1 1
1 2
1 3
1 4
2 1
2 2
2 3
2 4
3 1
3 5
4 6
4 7
5 6
5 7
6 8
Group (Table) - This is what I'm looking to build
GroupID AcctID
1 1
1 2
1 3
1 4
1 5
2 6
2 7
3 8
Appreciate any suggestions / techniques..... Joe
Have the following Tables:
Collateral (Table)
CollID
CollName
Account (Table)
AcctID
AcctName
CollateralAccount (Table)
CollID
AcctID
Need to generate a 4th table:
Group (Table)
GroupID
AcctID
What I need to do is setup "Groups" of accounts that have any collateral in common.
Could be cases where 2 or more accounts share same CollID links, but then a 3rd account shares a separate CollID with only one of the original 2 accounts. I'd still consider all 3 accounts being in the same "Group". So at the end of the day, an AcctID can only be a member of one "Group".
Have been researching this for some time and just can't seem to get any momentum.
Sample Data:
Collateral (Table)
CollID CollName
1 CollItemA
2 CollItemB
3 CollItemC
4 CollItemD
5 CollItemE
6 CollItemF
Account (Table)
AcctID AcctName
1 AcctA
2 AcctB
3 AcctC
4 AcctD
5 AcctE
6 AcctF
7 AcctG
8 AcctH
CollateralAccount (Table)
CollID AcctID
1 1
1 2
1 3
1 4
2 1
2 2
2 3
2 4
3 1
3 5
4 6
4 7
5 6
5 7
6 8
Group (Table) - This is what I'm looking to build
GroupID AcctID
1 1
1 2
1 3
1 4
1 5
2 6
2 7
3 8
Appreciate any suggestions / techniques..... Joe