I want to perform an operation(s) that will add or update a record in a table.
Here's the case. I have the health data of a breed of dogs for the past 17 years. It is in the form of quarterly tables so ... 68 tables. Some of the data represents a single result such as a hip x-ray which is graded and the grade is good for the life of the dog. Several other tests are the same. However, one test must be repeated every 15 months.
I thought I could take the oldest file and declare it to be the "Master file". Then I would take each successive quarterly table and use it as a "transaction table" to POST the Master table. However, the POST command doesn't seem to have the ability to "replace" a record in the Master table with a record from the Transaction table.
So, I've now hit on the idea of pre-processing the transaction table to split the table into two tables, one that contains records that will be APPENDed to the Master table and one that will UPDATE records. Then run the APPEND table against the Master table and the UPDATE table against the Master table, Then toss those 2 tables and pre-process the next quarterly table and use these to APPEND/UPDATE the Master.
However, this brings up one case. What can be done about the first instance of an eye exam, the exam that must be done at least every 15 months? The eye exam would normally be handled by the UPDATE process but the first time there's nothing to UPDATE. Do I need to run the UPDATE process first and trap those transaction table records that won't UPDATE to submit to the APPEND process?
Also, can all these by written as one process or do they need to be separate processes.
Here's the case. I have the health data of a breed of dogs for the past 17 years. It is in the form of quarterly tables so ... 68 tables. Some of the data represents a single result such as a hip x-ray which is graded and the grade is good for the life of the dog. Several other tests are the same. However, one test must be repeated every 15 months.
I thought I could take the oldest file and declare it to be the "Master file". Then I would take each successive quarterly table and use it as a "transaction table" to POST the Master table. However, the POST command doesn't seem to have the ability to "replace" a record in the Master table with a record from the Transaction table.
So, I've now hit on the idea of pre-processing the transaction table to split the table into two tables, one that contains records that will be APPENDed to the Master table and one that will UPDATE records. Then run the APPEND table against the Master table and the UPDATE table against the Master table, Then toss those 2 tables and pre-process the next quarterly table and use these to APPEND/UPDATE the Master.
However, this brings up one case. What can be done about the first instance of an eye exam, the exam that must be done at least every 15 months? The eye exam would normally be handled by the UPDATE process but the first time there's nothing to UPDATE. Do I need to run the UPDATE process first and trap those transaction table records that won't UPDATE to submit to the APPEND process?
Also, can all these by written as one process or do they need to be separate processes.
Comment