I am developing website in asp.net. On some page we add data to database.
But that data will be removed from database when its validity is over.
I will provide date to data .
The data is valid to that date.
Please give me reply urgently.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Syed ShanuPosted Apr 13, 2015, 2:03 AM
But i assume that you want to delete few records from your table after some days.
lets consider that you have TableA in this table you can add a Status Column as deleteStatus by default to 'N'
and after some days or you can have some logic to change the status for deleting rerecords to 'Y'
Create one procedure .
Check for the deletestatus='Y' record and delete that rows from Store Procedure.
Create SQL JOB Agent .Add your Stored Procedure to job and set the intervel as every day or weekly one day like that.
Syed ShanuPosted Apr 13, 2015, 3:25 AM
paresh gugalePosted Apr 13, 2015, 3:14 AM