A
alathwell
I need to be able to copy a series of records from a set of related tables.
Tables are related as below:
tblEventSeries - Primary key SeriesID -> 1 EventSeries
tblEvents - Related key SeriesID, Primary key EventID -> Can be many Events
tblEventResources - Reelated keys SeriesID , EventID, Primary Key ResourceID
- Can be many resources
I want to copy the contents of each table, but with a new SeriesID, & new
related EventID's but the same ResourceID's as the resources will remain the
same. It is the SeriesEvent and Event details that will be new but with same
of the orginal data reused, but not for instance the same client , clientref
num or event names.
I am succesfully copying records on my previous version which didn't have
the tblSeriesEvent element to the database, but with the new version I just
cannot get the tblEventResouces to copy the correct reords for each tblEvent
related to the tblEventSeries. Somehow I need to retain the tblEvent
EventID's from the original EventSeries and append them to the
tblEventresources, but with the new related EventID & SeriesID.
Any help would be really appreciated.
Regards
alalthwell
Tables are related as below:
tblEventSeries - Primary key SeriesID -> 1 EventSeries
tblEvents - Related key SeriesID, Primary key EventID -> Can be many Events
tblEventResources - Reelated keys SeriesID , EventID, Primary Key ResourceID
- Can be many resources
I want to copy the contents of each table, but with a new SeriesID, & new
related EventID's but the same ResourceID's as the resources will remain the
same. It is the SeriesEvent and Event details that will be new but with same
of the orginal data reused, but not for instance the same client , clientref
num or event names.
I am succesfully copying records on my previous version which didn't have
the tblSeriesEvent element to the database, but with the new version I just
cannot get the tblEventResouces to copy the correct reords for each tblEvent
related to the tblEventSeries. Somehow I need to retain the tblEvent
EventID's from the original EventSeries and append them to the
tblEventresources, but with the new related EventID & SeriesID.
Any help would be really appreciated.
Regards
alalthwell