Cross Table , Interchange information
Posted on 2008-09-29
I've been cracking my head for some time on this now,
I need to record interchange infomration:
the records come in like this:
Record Type1: Item 'Q' = Item 'W' ::Item Q is the same as item W
Record Type2: Item 'A' -> Item 'B' ::Item A Replaced by Item B
Now my guest guess was to seperate this into 2 tables
Where Type 1:
Item | Group
'1' | 'A'
'2' | 'B'
'3' | 'C'
'4' | 'C'
'5' | 'C'
If i want to see #4 then trhough group i get "3,4,5" all '='
Item | Into Item
'1' | '2'
'1' | '3'
'4' | '5'
If i want to see #1 then though i get "2,3" all replace '1'
Now here comes the problem
1.With close to a million records it takes a really of a long time to process,
1.1 I Create an array in keep looping throught table 1 and 2 untill no new records are found
Here is now it works Based on the above tables
:2 | 3,4
:6 | 5
*** I also Identify loops with this procedure, if i have records like "5 ->1"