I have 2 tables. Table A contains records for a unique key field. A record for the same key field should exist in Table B, and B contains a "pipelength" field whose value should match the "pipelength" field in A. 1-to-1 relationship between A and B.
1) I need to verify that all records in A have a key field match in B. If not, I need to add a record in B (all the data I need for adding the record in B exists in A).
2) If the record does exist in B, I need to confirm that it's "pipelength" matches the "pipelength" value in A.
I'm maintenancing a corporate system so although the data structure isn't very efficient I have to work with it.
I use DAO recordsets a lot so 1st thought was to load A in a recordset and process each record. Then use a SELECT statement to pull the matching data from B. A null result would necessitate an APPEND query into B. For a non-null result, how can I check and/or edit the value of the "pipelength" field from B?
2nd thought was 2 recordsets and seek the key field value in B. Then I could "see" the "pipelength" field and confirm and/or edit it's value. Thoughts?
1) I need to verify that all records in A have a key field match in B. If not, I need to add a record in B (all the data I need for adding the record in B exists in A).
2) If the record does exist in B, I need to confirm that it's "pipelength" matches the "pipelength" value in A.
I'm maintenancing a corporate system so although the data structure isn't very efficient I have to work with it.
I use DAO recordsets a lot so 1st thought was to load A in a recordset and process each record. Then use a SELECT statement to pull the matching data from B. A null result would necessitate an APPEND query into B. For a non-null result, how can I check and/or edit the value of the "pipelength" field from B?
2nd thought was 2 recordsets and seek the key field value in B. Then I could "see" the "pipelength" field and confirm and/or edit it's value. Thoughts?