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.
| Author |
Topic |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2011-06-07 : 15:24:01
|
| What is this saying it is doing?where (dateadd(mm, -13, getdate()) < mnth_endt) |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-06-07 : 15:43:43
|
| (dateadd(mm, -13, getdate()) finds the date and time exactly 13 months ago. So right now at 2011-06-07 15:41:55.210, that will return 2010-05-07 15:41:55.210. So then the where clause is checking whether mnth_endt is later than that. That is, whether mnth_endt is within 13 months from now. |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2011-06-07 : 16:04:03
|
| Great thanks! |
 |
|
|
|
|
|