Results 1 to 2 of 2

Thread: date problem

  1. #1
    Join Date
    Feb 2004
    Posts
    23

    Unanswered: date problem

    I am trying to perform a simple trigger than will update a timestamp field after am update but funtion keeps going in a loop can anyone help?
    example code

    begin
    UPDATE table
    set "datemodified" = CURRENT_TIMESTAMP
    where table."pk" = new."pk";
    return null;
    end;

    not this is being called from a trigger

  2. #2
    Join Date
    Dec 2004
    Location
    Kharkov, Ukraine
    Posts
    40
    You must create "before update trigger" with such body:
    begin
    NEW."datemodified" = CURRENT_TIMESTAMP;
    return NEW;
    end;

Posting Permissions

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