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-16 : 11:55:18
|
| I want to get dates over 300 Daysthis way... and (Datediff(DAY, conv_flg_cdt, Getdate()) > 300) or this way... and conv_flg_cdt< dateadd(dd,-300,getdate()) Which one is correct please and why? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-06-16 : 12:01:16
|
| Both are correct, the 2nd one will perform better if there's an index on that column. |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2011-06-16 : 12:10:59
|
| Okay thanks! |
 |
|
|
|
|
|