C
Chris
I am writing a function to copy records from one table to another, and
would like any suggestions on the best methods I can use. I would
normally use recordsets, but if there are any SQL solutions I would
like to hear them. Here is the problem:
I have four tables, T1, T2, T3, T4. T1 and T3 have identical
structures, as to T2 and T4.
A user will enter records into T1. Sometimes, the record will be
linked to one other record in T1 (there will only ever be singles or
pairs). If two records are linked, an entry is made in T2, storing the
IDs of the two linked records in T1.
Once the user has entered some information and is happy it is copied
from T1 to T3. This means the IDs are almost certain to change. What
is the best way to copy or create the appropriate link records in T4?
Usually, I would use recordsets to step through the records and update
the information as I go. Is there any other way to do this? Also,
would there be a better design to use? It would be difficult to
implement such a change, but I am willing to hear suggestions.
Thanks in advance!
Chris.
would like any suggestions on the best methods I can use. I would
normally use recordsets, but if there are any SQL solutions I would
like to hear them. Here is the problem:
I have four tables, T1, T2, T3, T4. T1 and T3 have identical
structures, as to T2 and T4.
A user will enter records into T1. Sometimes, the record will be
linked to one other record in T1 (there will only ever be singles or
pairs). If two records are linked, an entry is made in T2, storing the
IDs of the two linked records in T1.
Once the user has entered some information and is happy it is copied
from T1 to T3. This means the IDs are almost certain to change. What
is the best way to copy or create the appropriate link records in T4?
Usually, I would use recordsets to step through the records and update
the information as I go. Is there any other way to do this? Also,
would there be a better design to use? It would be difficult to
implement such a change, but I am willing to hear suggestions.
Thanks in advance!
Chris.