I want to delete records from a db table based on a time-stamp for each record. I would like to have it automatically delete records compared to a date/time interval without
SQL Server Agent can do this for you.
Simply create a job with a regular schedule and the SQL you want to run. There is an easy to use wizard interface for job creation.
Create a sql JOB with below query:
UPDATE [dbo].[User] WITH (ROWLOCK) SET active_flag=0 where lastlogindt < DATEADD(Day,-90,GETDATE())