Hi David,
The table is a list of accounts. There is a Household ID field in the table. The process places all accounts into Households by assigning a Household ID for all those that have a similar Address, SSN, or Customer Number, whichever occurs first.
Here are three sample records (accounts):
(Name | Address | SSN | Customer#)
John Smith | 123 Main | 123-45-6789 | 123
Bob Jones | 456 Oak | 234-56-7890 | 124
Sally Smith| 123 Main | 987-65-4321 | 125
After processing, you would have for Household=1:
John Smith | 123 Main | 123-45-6789 | 123
Sally Smith| 123 Main | 987-65-4321 | 125
..and for Household=2:
Bob Jones | 456 Oak | 234-56-7890 | 124
Hope this helps! Thanks so much for your input - meanwhile, I'll try using LOCATE instead of GO TOP.
Mark
>It's kind of hard to read exactly what you are trying to do in that code. You basically have an O(n
2) algorithm there. And (1.5x10^6)
2 is quite a bit bigger than (5x10^5)
2. And it may be even worse then O(n
2) depending on how the other two fields end up inside your looping structure.
>
>The GO TOP is not rushmore optimizeable you should use a LOCATE instead. Changing ORDER etc might be better handled by using the same table under alternate aliases. There may even be a couple of SQL statements that can handle the operation.
>
>Can you describe in words what your loop is doing? Maybe show a couple of records before and after processing?
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.