Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006

    Unanswered: :NEW.<column_name> getting old value when that column is not updated

    Hi All,
    I am using the triggers to audit the data changes in my database actually when data in a particular column is changed then we get the ld.<column_name> with the old value and :new.<column_name> with the new value. but when the data in a column is not changed and when i want to access the :new.<column_name> and ld.<column_name> i am getting the same value but my doubt is when we are not changing the value of a particular column then the :new.<column_name> should have null in it. Which is not happening can any one clarify me why it is not happening.

    Thanks in Advance.

  2. #2
    Join Date
    Jun 2004
    Liverpool, NY USA
    wHY SHOULD :NEW HAVE null? the data for the column after the update is the same as before, so ld and :new are the same.
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Dec 2003
    We found that the following made the code easier to read

    If Updating ('START_DATE') Then
      -- do something
    End If;
    You don't use the :NEW or :OLD tags to clarify anything, just the name of the column you want to check if an update has occurred against, passed in with quotes around it.


  4. #4
    Join Date
    Sep 2002
    Provided Answers: 1
    If :NEW.column were null when you didn't update the column, how would you know when the column was updated to be NULL?

Posting Permissions

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