ironhide1975
Programmer
I'm trying to setup a way for SQL server to automatically delete records that are older than 30 days. The current working script I have is.
CREATE PROCEDURE [dbo].[deleteOldRecords] AS
@CutOffDate = DATEADD(dd, -30, CURRENT_TIMESTAMP)
DELETE FROM TrackUser WHERE DateTime < @CutOffDate
Can anyone help me write this? Much appreciated if so.
Therm-o-disc -
CREATE PROCEDURE [dbo].[deleteOldRecords] AS
@CutOffDate = DATEADD(dd, -30, CURRENT_TIMESTAMP)
DELETE FROM TrackUser WHERE DateTime < @CutOffDate
Can anyone help me write this? Much appreciated if so.
Therm-o-disc -