Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
table_agg_stg
AS (SELECT trigger_sql,
table_name,
listagg (
'audtab.' || column_name || ':= :NEW.' || column_name,
'; ')
WITHIN GROUP (ORDER BY column_id)
insert_column_list,
listagg (
'audtab.' || column_name || ':= :OLD.' || column_name,
'; ')
WITHIN GROUP (ORDER BY column_id)
update_column_list
FROM table_columns_stg
GROUP BY trigger_sql, table_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment