Is there a way to use Indirect Variable Referencing in a Trigger?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Is there a way to use Indirect Variable Referencing in a Trigger?

  1. #1
    Join Date
    Oct 2000
    Posts
    1

    Question

    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.

  2. #2
    Join Date
    Jul 2000
    Posts
    521
    Use dynamic SQL.
    But then a single trigger can not be used for multiple table.
    svk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width