Timestamp Trigger


  • Running SQL Server 2005, I need to add a trigger to a table in Microsoft Dynamics GP to update a modified date.  I have zero experience with SQL triggers, but I have installed SQL Server, written complex queries, stored procedures and converted Access databases to SQL, so I do have a pretty good understanding of SQL.  I have searched Google and looked through the MSDN forums and feel like I am all thumbs when I attempt to create this trigger - meaning I have failed several times and am now seeking assistance. 

    Basically what I am needing is the following:
    > The table is MN010000 (for anyone who is using Great Plains)
    > The table fields are: NOTEINDX, DATE1, TIME1, USERID, DEX_ROW_ID, NOTETEXT_I
    > The field that will be changing is NOTETEXT_I
    > Upon changing, the DATE1 and TIME1 values need to update to CURRENT_TIMESTAMP
        * Additionally the USERID should update to the user modifying the note, but that is not a concern at this time

    In my mind I am making it much harder than it is and it is frustrating me. 

    Jody Wood
    Friday, October 22, 2010 2:02 PM


All replies