G
Guest
I've inherited a database at work and need to make some corrections...Here is
my problem. I need to find related fields where no obvious relationship
exists...Here's an example of a few rows delimeted by commas...
Table name: Products
Fields: ProductID (text), ProductType (text)
2342,door
2321,knob
2331,window
3212,table
5231,door
2121,window
3222,door
4321,knob
Anytime I see "door" AND it's followed immediatly by "knob" in the same
field on the very next record (assume it's sorted correctly) then I need to
add a new field to the row with "knob" and fill it with the ProductID of
door. IF NOT, then fill the new field with ProductID of the original row...
The corrected version of above would be
2342,door,2342
2321,knob,2342
2331,window,2331
3212,table,3212
5231,door,5231
2121,window,2121
3222,door,3222
4321,knob,3222
The MAJOR headache here is that it's a table with 900,000+ rows...What is
the best way to go about this? My work PC has 9000 recordlocks (not
changable), which makes doing a loop difficult at best...
I have a moderate understanding of VBA
my problem. I need to find related fields where no obvious relationship
exists...Here's an example of a few rows delimeted by commas...
Table name: Products
Fields: ProductID (text), ProductType (text)
2342,door
2321,knob
2331,window
3212,table
5231,door
2121,window
3222,door
4321,knob
Anytime I see "door" AND it's followed immediatly by "knob" in the same
field on the very next record (assume it's sorted correctly) then I need to
add a new field to the row with "knob" and fill it with the ProductID of
door. IF NOT, then fill the new field with ProductID of the original row...
The corrected version of above would be
2342,door,2342
2321,knob,2342
2331,window,2331
3212,table,3212
5231,door,5231
2121,window,2121
3222,door,3222
4321,knob,3222
The MAJOR headache here is that it's a table with 900,000+ rows...What is
the best way to go about this? My work PC has 9000 recordlocks (not
changable), which makes doing a loop difficult at best...
I have a moderate understanding of VBA