Joshua Jacobs
I need to find all the records that were last modified more than one month ago, and delete them. How do I create the date dynamically with MS SQL?
dateadd(month, -1, current_timestamp)
To see it in action run this:
select dateadd(month, -1, current_timestamp)
For more information, see the MS docs: http://msdn.microsoft.com/en-us/library/ms186819.aspx
I need to find all the records that were last modified more than one month ago, and delete them. How do I create the date dynamically with MS SQL?
dateadd(month, -1, current_timestamp)
To see it in action run this:
select dateadd(month, -1, current_timestamp)
For more information, see the MS docs: http://msdn.microsoft.com/en-us/library/ms186819.aspx
-
Calendar
February 2012 S M T W T F S « Nov 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 -
Meta
