Skip to content
Advertisement

SQL – trigger select into after update/insert

i have a table called Audit_Data, and from time to time there is an update coming. Every single update consists of around 300 rows (around 20 columns per row), and all of the rows from the same update share the same Audit_ID.

I have a select, that pulls out only this data, which is relevant for me. It basically transform the 300×20 field data into one row of data.
Is there a way to create a SQL trigger, that would perform the select on the updated Audit_Data table, and insert selected data into table named Audit_Final?

This is my select statement that i use to pull out the relevant data:

Advertisement

Answer

Based on authors comment this is what is required here:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement