I would like to create an SQL statement in one public sub, to be called from another public sub, all of this in an Access module. I have 40,000 records in table "A" and approximately 2,500 of those records have a wrong value in one of the fields of its record.
In table "B", the correct value exists. In table "B" the key field is the part number field.
In table "A" the 2,500 records also have the same part number data that is in table "B". Table "B" has the correct value needed for the field in table "A". I want this correct value in table "B" to be used to update the wrong value in table "A" by joining on part number in table "B".
How do I write the SQL that joins table "A" and "B" for updating the value field in table "A" from the value field in table "B"? In narrative form:
Update value field in table "A" with value field in table B where part number in table "A" equals the part number in table "B".
All of this in MS Access modules/public subs.
In table "B", the correct value exists. In table "B" the key field is the part number field.
In table "A" the 2,500 records also have the same part number data that is in table "B". Table "B" has the correct value needed for the field in table "A". I want this correct value in table "B" to be used to update the wrong value in table "A" by joining on part number in table "B".
How do I write the SQL that joins table "A" and "B" for updating the value field in table "A" from the value field in table "B"? In narrative form:
Update value field in table "A" with value field in table B where part number in table "A" equals the part number in table "B".
All of this in MS Access modules/public subs.