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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Syed ShanuRank #87 · 23.7K reputationPosted Apr 12, 2015, 10:03 PM EDT
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.
paresh gugale56 reputationPosted Apr 12, 2015, 11:14 PM EDT
Syed ShanuRank #87 · 23.7K reputationPosted Apr 12, 2015, 11:25 PM EDT