Microsoft
Software
Hardware
Network
Question : Trigger on record insert
Hello,
I want to write a trigger where as soon as a record has been inserted into the tablei have a field called 'DateAddedToDB' which i want to update with the day the record was added.
Im not familiar with triggers so im not really sure how to tackle it... any suggestions.
Thanks,
Answer : Trigger on record insert
Assuming that DateAddedToDB is in the same table then the best way to solve this problem is simply to add a DEFAULT value of GETDATE() to the DateAddedToDB.
Random Solutions
The SUM function requires 1 argument.
Lost User Id and Password for Windows Server 2003 Standard Edition
How to reset inheritance on all Sharepoint subsites?
Can't change formatting in a form...
Wrong user being shown when file is locked
Dell Inspiron 1501 hangs right before desktop loads
Edit multiple .txt documents via a batch program
Strip HTML from search results
Outlook 2007 Calendars Updating Shared Calendar only updates Personal Calendar
Can't exit design mode because control can not be created