Quote:
quote:Originally posted by robprell
assuming you have a time stamp (as you should) on one of the fields in your table your can select max timestamp.
|
The TimeStamp datatype is very badly misnamed in SQL Server. There is an alias for it called
rowversion which describes its purpose much better.
The timestamp datatype does not in fact store a time in it at all; it is simply a value which is automatically incremented every time the row containing it is updated.
The value in it has no useful meaning. A typical use for it is that if you save away the timestamp value when you read a row, then compare that value to the value of the timestamp column at the time you attempt to do an update, if the values are different you can detect that the row must have been changed by somebody else before you got a chance to commit your update.
This can be a very useful form of concurrency control, but it won't tell you the time of the day, which is what the OP is looking for (I think) ...
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com