Created
January 1, 2020 07:43
-
-
Save VikramVasudevan/b3d8f2304c3e2a227ca45e4368c73566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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