How to setup SQL Server to delete/reset table every Monday morning

  • I would like to try and reset/delete incidents from a table every Monday morning

  • Not exactly what you mean by reset/delete,  reset can have a different meaning than delete.  If you are talking about deleting all the data from the table once a week on a Monday, setup a SQL Agent job that runs in the appropriate database at the appropriate time and runs the following SQL statement:  TRUNCATE TABLE dbo.yourincidentstablenamehere;

     

    • This reply was modified 5 years, 3 months ago by Lynn Pettis.
  • Lynn Pettis wrote:

    Not exactly what you mean by reset/delete,  reset can have a different meaning than delete.  If you are talking about deleting all the data from the table once a week on a Monday, setup a SQL Agent job that runs in the appropriate database at the appropriate time and runs the following SQL statement:  TRUNCATE TABLE dbo.yourincidentstablenamehere; google street view

    Oh that was it, great thank you so much!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply