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)
 data lost automatically?

Author  Topic 

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-16 : 23:18:01
hi,

Is it possible to make to lost data in table automatically after 3 days(count from start date of insert)?
if can,how?

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-04-17 : 00:16:40
do you mean to delete data that is older than 3 days? if you have a datetime column that marks when the row was created, you could do this easily with an agent job scheduled to run every night.


elsasoft.org
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-17 : 00:23:46
I guess what you want is a stored procedure which deletes all records from a table which is more than 3 days old. Schedule a job in sql server agent to execute this stored procedure according to your convineint schedule.
Go to Top of Page

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-17 : 01:20:01
Please,
can u tell me detail to schedule coz i never do that previously and
i don't know about this at all.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-17 : 02:46:39
http://technet.microsoft.com/en-us/library/ms191439.aspx
Go to Top of Page
   

- Advertisement -