Hi Team,

I have to create one trigger. Whenever some insert happens I want that trigger to be fired.

Please see this query:

select dept_id, acct_airing_id, lag(dept_airing_id) over (partition by acct_airing_id order by dept_id) as old_dept_airing_id,

dept_airing_id, last_update_date,action_ind from dept where action_ind in(‘D’,’X’,’A’) order by last_update_date desc ;

I want to add this query in trigger. This query output will give me after and before insert changes. I will be needing all those changes which happens in dept_airing_id.

I am trying to store this query output in a table, so that whenever any insert happens, trigger will be fired. And once the trigger will be fired, this query output will get stored in some table(I have created).

Can you please help me out , how can I insert this query output in a table using trigger. So that whenever that trigger fires, this select query runs and store its output in a table.


Leave a Reply