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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Timestamp

Author  Topic 

i386
Starting Member

4 Posts

Posted - 2006-04-20 : 10:14:23
Hi,

I would like to delete records on a table which over 10 days old by using the Binary Timestamp field.

Is this possible ?

Thanks,
Gavin

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-20 : 10:22:43
you mean the timestamp data type ?



KH


Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-04-20 : 10:25:53
This is what is in Books Online (SQL Server Help)

Special Data
Special data consists of data that does not fit any of the categories of data such as binary data, character data, Unicode data, date and time data, numeric data and monetary data.

Microsoft® SQL Server™ 2000 includes four types of special data:

timestamp
Is used to indicate the sequence of SQL Server activity on a row, represented as an increasing number in a binary format. As a row is modified in a table, the timestamp is updated with the current database timestamp value obtained from the @@DBTS function. timestamp data is not related to the date and time of an insert or change to data. To automatically record times that data modifications take place in a table, use either a datetime or smalldatetime data type to record the events and triggers............


Srinika
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-20 : 10:30:33
from Books online
quote:
Microsoft® SQL Server™ 2000 introduces a rowversion synonym for the timestamp data type. Use rowversion instead of timestamp wherever possible in DDL statements.

Guess most people think the data type timestamp is for time-stamping



KH


Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-04-20 : 10:53:10
This confusion is why the new name (2000 and up) for this datatype is ROWVERSION.



CODO ERGO SUM
Go to Top of Page

i386
Starting Member

4 Posts

Posted - 2006-04-20 : 10:59:27
Ah well,
I guess there's no such thing as a free lunch...

Now I know what's this timestamp field is all about.

Gavin ;-)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-20 : 11:09:06
Read about timestamp columns in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -