Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
If I am running a scheduled job at the first of the month and I want to run an update sequence for the previous month, i was essentially using this sql:@startdate = dateadd(mm, -1, getdate())@enddate = dateadd(dd, -1, getdate())So, will the @enddate represent the last day in the previous month or will that not work?The Yak Village Idiot
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2007-03-22 : 19:42:45
No. It will not work. Didn't you ever test it out at all ?