Insert Source table name on insert event [message #38843] |
Mon, 20 May 2002 11:52 |
Toyn
Messages: 36 Registered: April 2001
|
Member |
|
|
I have a table that will continually be the subject of inserts from different source tables. Is there any sort of trigger that will insert the name of the source table into a pre-created field in the destination table? i.e.
if inserting from tableA
then set :new.source = 'tableA'
else if inserting from tableB
then set :new.source = 'tableB'
Thanks.
|
|
|
Re: Insert Source table name on insert event [message #38847 is a reply to message #38843] |
Mon, 20 May 2002 14:19 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
No, you will need to either: 1) supply that value on the INSERT statement, 2) set the value in a package variable and refer to that variable in the trigger, or 3) create a view on each of the source tables that includes the table name as one of the columns and then refer to the view on your insert statement.
|
|
|