From: doug on 1 Dec 2009 19:29 Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance.
From: Plamen Ratchev on 1 Dec 2009 21:21 You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -- Plamen Ratchev http://www.SQLStudio.com
|
Pages: 1 Prev: fn_trace_gettable Read All Traces In Directory Next: Merging two select cases |