Sure, drop this in any SP:
Delete from tableName where dateDiff("d",dateCreated,getdate()) > 90
Jacob
-----Original Message-----
From: Bosky, Dave [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:05 AM
To: SQL
Subject: Delete records that are 90 over 90 days old.
Does anyone have a MSSQL procedure that will compare a datetime
field(dateCreated) to the current date and delete the record if its older
than 90 days?
Thanks,
Dave
HTC Disclaimer: The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer. Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
In the beginning ColdFusion shipped with Website. Both have only gotten better
http://www.deerfield.com/products/website/
Message: http://www.houseoffusion.com/lists.cfm?link=i:6:1698
Archives: http://www.houseoffusion.com/lists.cfm?link=t:6
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:6
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=<:emailid:>.<:userid:>.<:listid:>