PL/SQL (MOSC)

MOSC Banner

Dynamically Creating views inside a Table Based Trigger

in PL/SQL (MOSC) 2 commentsAnswered

Hello,

I have a need to create a dynamic database view based on incoming inserts in a table. The view name convention that will be created needs to be "Table_Name"||"_<uniqueid>||_V".

For e.g. If the table name, on which the AFTER INSERT trigger is being written is LOG_FILE, then the view needs to be something like LOG_FILE_1234_V.

I struggle with dynamically capturing the table name in the trigger and storing it in a system variable. I do not want to hard-code the table name.

create or replace TRIGGER APPS.LOG_FILE
AFTER INSERT
ON LOG_FILE

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center