#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0

    SYSDATE function


    Hi all,

    It is possible to get the system date in a SQL sentence? I have a trigger that is executed every time a new row is inserted in a table. In the trigger code I would like to store the system date in a column, but I don't know how to get it. I have read something about UDF, but I don't know if there is such UDF for Firebird. I have try to execute a simple 'select sysdate() from xxx' but is does not work. Could anynone help me?

    Thanks,

    Trini.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Hi,

    NEW.column_name = CURRENT_TIMESTAMP;


    With regards,

    Martijn Tonies
    Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
    Upscene Productions
    http://www.upscene.com
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    4
    Rep Power
    0
    That's exactly what I needed, thanks !!!!

IMN logo majestic logo threadwatch logo seochat tools logo