Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
santkris4
Starting Member
10 Posts |
Posted - 2011-02-25 : 15:37:06
|
| I was reading through a lot of forums regarding this requirement.I have a SQL 2008 R2 box and i have a ChangeDatetime column which is of type Datetime. I was thinking of updating this column with the systemdatetime value everytime a row gets updated (Not inserted!).Other than doing this using a trigger or passing as a value from the consuming app, are there any new features as part of 2008 or 2008 R2?I looked at TIMESTAMP datatype but that doesnt address the requirement.All comments are greatly appreciated! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
santkris4
Starting Member
10 Posts |
|
|
mmarovic
Aged Yak Warrior
518 Posts |
Posted - 2011-02-25 : 18:30:11
|
| No, you don't have to pass the current dateTime value as long as it is (sql) server time you want to record. Just set the column value to getDate() or sysDateTime or ... Take a look here [url]http://msdn.microsoft.com/en-us/library/ms186724.aspx[/url]MirkoMy blog: http://mirko-marovic-eng.blogspot.com/ |
 |
|
|
|
|
|