Groups | Blog | Home
all groups > sql server (alternate) > august 2003 >

sql server (alternate) : Adding a time stamp to the records


Bill
8/29/2003 11:32:31 PM
I have a shopping cart that will get full from time to time because
customers click out of the site before they confirm their purchase,
therefore leaving a full cart behind. I'd like to have a timestamp on
this table, so that I can delete anything that I find is more than a day
old.

How can I do this?

Thanks,

Bill

*** Sent via Developersdex http://www.developersdex.com ***
John Bell
8/30/2003 12:51:12 AM
Hi

You could use a not null datetime field and specify the default as
getdate(). This will insert the current date/time when the record is
created. and you will not have to specify a value. You can then run a
scheduled task (job) that checks for entries older than a given date.

John

[quoted text, click to view]

AddThis Social Bookmark Button