Hi,
I am trying to create a versioning function in Ms Access. That means that I have a bunch of related data that I would like to duplicate with a new version number, also the child records should be duplicated and linked to the newly duplicated items. I can't get my head around what the best approach would be. Do I need to do that in a loop that goes through each record, duplicates it, then uses the newly created PK (e.g. ID) to create the child records with that PK as FK (e.g. OrderID) ? Or is there a way to do that in one query?
Thanks!
I am trying to create a versioning function in Ms Access. That means that I have a bunch of related data that I would like to duplicate with a new version number, also the child records should be duplicated and linked to the newly duplicated items. I can't get my head around what the best approach would be. Do I need to do that in a loop that goes through each record, duplicates it, then uses the newly created PK (e.g. ID) to create the child records with that PK as FK (e.g. OrderID) ? Or is there a way to do that in one query?
Thanks!