Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    24

    Unanswered: How to get list of updated columns from within a trigger

    Hi,

    I am using DB2 9.7 enterprise edition on Windows 7. I have created a trigger and now I need to know which columns have been updated, from within the trigger. In MS SQL 2008 there is a function called "COLUMNS_UPDATED()" that gives you just that. However, after a lot of searching I cannot find an equivalent function for DB2. Any ideas? Thanks.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You will have to provide more information for those of us who do not know SQL Server.

    Andy

  3. #3
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    compare old.col to new.col
    (when old.col <> new.col)
    db2 does not have (yet) a comparable function like COLUMNS_UPDATED() which returns a bitmask indicating which columns have been updated.
    Dick Brenholtz, Ami in Deutschland

Posting Permissions

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