date time
What is the proper syntax to remove records from a table where the timestamp
column is greater than 5 days old?
# 1 Re: date time
when you say "timestamp" you do not mean a timestamp datatype do you ? If
so, there is no meaning to its value that can be used in a datetime
calculation
if not and you mean a datetime column, then it w/b something like:
SELECT name, crdate
FROM sysobjects
WHERE datediff(dd, crdate, getdate() ) > 5
--
HTH,
David Satz
Principal Web Engineer
Hyperion Solutions
"Leon Parker" <lparker@lortobco.com> wrote in message
news:3d90cb05$1@10.1.10.29...
>
> What is the proper syntax to remove records from a table where the
timestamp
> column is greater than 5 days old?
# 2 Re: date time
hi,
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.
thanks
"David Satz" <davidNOSPAMsatz@yahoo.NOSPAM.com> wrote:
>when you say "timestamp" you do not mean a timestamp datatype do you ? If
>so, there is no meaning to its value that can be used in a datetime
>calculation
>
>if not and you mean a datetime column, then it w/b something like:
>
>SELECT name, crdate
>FROM sysobjects
>WHERE datediff(dd, crdate, getdate() ) > 5
>--
>HTH,
>David Satz
>Principal Web Engineer
>Hyperion Solutions
>
>"Leon Parker" <lparker@lortobco.com> wrote in message
>news:3d90cb05$1@10.1.10.29...
>>
>> What is the proper syntax to remove records from a table where the
>timestamp
>> column is greater than 5 days old?
>
>