Click to See Complete Forum and Search --> : Is there a way to use Indirect Variable Referencing in a Trigger?


shawn_tx
10-04-2000, 09:41 PM
Is there a way to use Indirect Variable Referencing in a Trigger?

I wish to write a trigger that can be used on multiple tables to can dynamically output all data values in
the record through reading of the system catalog tables. The main problem that I have encountered is
that the column names such as :NEW.CUST_ID need to be known at compile time. I wish to build a string
which contains ':NEW.CUST_ID' and have it return the contents of :NEW.CUST_ID.

svk
10-05-2000, 12:35 PM
Use dynamic SQL.
But then a single trigger can not be used for multiple table.