Monday, June 22, 2015

delete Elmah errors older than 7 days stored procedure

CREATE PROCEDURE ELMAH_DELETE_OLDERRORS

AS
BEGIN
SET NOCOUNT ON;
DELETE FROM ELMAH_Error
--SELECT * FROM ELMAH_Error
where TimeUtc < dateadd(DAY,-7,getdate());
END
GO