Using SQL 2005
I need a trigger that will run when a record is inserted in to the table, but the trigger needs to pull data from the record ID that was inserted right before the INSERTED record that initiates the trigger. I hope that makes sense. Is this possible?
Is there a way that the trigger can determine the ID of the inserted record, and if so, what would be the syntax for doing this - at that point if I had this, it wouldn't be hard to run a query against the table containing those records. If you need more info please let me know.
Thanks for your help,
Kevin
I need a trigger that will run when a record is inserted in to the table, but the trigger needs to pull data from the record ID that was inserted right before the INSERTED record that initiates the trigger. I hope that makes sense. Is this possible?
Is there a way that the trigger can determine the ID of the inserted record, and if so, what would be the syntax for doing this - at that point if I had this, it wouldn't be hard to run a query against the table containing those records. If you need more info please let me know.
Thanks for your help,
Kevin