Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Location
    India
    Posts
    5

    Question Unanswered: How to get the sql statement that fired trigger

    I want to read the sql statement in trigger by which trigger is fired. Can any one help?

  2. #2
    Join Date
    Jul 2009
    Posts
    1
    叼你,竟然没人回复.

  3. #3
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Use these steps:
    - suppose you have an INSERT trigger on table A
    - then your statement is something like: INSERT INTO A(...) VALUES(...)
    - query the <i>inserted</i> table and you will have the values
    - eliminate the NULLs
    - query the data dictionary (system tables) and you will have the field names
    - you are now able to re-create the entire INSERT
    - why do you need it?
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  4. #4
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by ridiculous
    叼你,竟然没人回复.
    Hi Ridiculous,

    1) Please be aware this is an English site and state your posts in English.
    2) I did a translate google and from what I can figure out, it says theres not a single person who responded to this thread for a long time.

    Can you please clarify in English?

Posting Permissions

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