I have been trying to do this with a simple trigger but it looks not to be possible due to lack of a common value/field.
The first part of the trigger works fine:
- On insert to table A, insert/duplicate 10 rows from a lookup into table B.
However I need those rows to have the ID of the row in table A which triggers this.
The problem I suppose is there is no relationship with or PK in the lookup table.
The first part could also be achieved by having 10 'dummy' rows in table B, which the trigger then duplicates. This removes the need for a lookup table and reduces the trigger to linking two tables rather than three. It just seems slightly messier in that any additional rows could mess things up.
But if it works I could live with the latter.
It looks at the moment like it might have to be handled by receiving a parameter in the datapage for all this, but that could be very messy also.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
biota
I have been trying to do this with a simple trigger but it looks not to be possible due to lack of a common value/field.
The first part of the trigger works fine:
- On insert to table A, insert/duplicate 10 rows from a lookup into table B.
However I need those rows to have the ID of the row in table A which triggers this.
The problem I suppose is there is no relationship with or PK in the lookup table.
The first part could also be achieved by having 10 'dummy' rows in table B, which the trigger then duplicates. This removes the need for a lookup table and reduces the trigger to linking two tables rather than three. It just seems slightly messier in that any additional rows could mess things up.
But if it works I could live with the latter.
It looks at the moment like it might have to be handled by receiving a parameter in the datapage for all this, but that could be very messy also.
Any suggestions welcome!
TIA
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.