Hello
Please help.
I have to retrieve data when table.depdate>currentdate+2 or table.depdate=null
When I say getdate() I get data like
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
and for depdate
2011-07-25 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-27 00:00:00
2011-07-27 00:00:00
2011-07-27 00:00:00
2011-07-28 00:00:00
2011-07-29 00:00:00
2011-07-29 00:00:00
2011-07-29 00:00:00
which I don’t know to compare or to convert.
If I say
table.depdate>getdate()+2
I get zero records, I guess because getdate() brings the minutes, seconds, …which depdate doesn’t bring.
How shall I write this select?
Please help.
I have to retrieve data when table.depdate>currentdate+2 or table.depdate=null
When I say getdate() I get data like
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
2011-07-26 13:21:43.417
and for depdate
2011-07-25 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-26 00:00:00
2011-07-27 00:00:00
2011-07-27 00:00:00
2011-07-27 00:00:00
2011-07-28 00:00:00
2011-07-29 00:00:00
2011-07-29 00:00:00
2011-07-29 00:00:00
which I don’t know to compare or to convert.
If I say
table.depdate>getdate()+2
I get zero records, I guess because getdate() brings the minutes, seconds, …which depdate doesn’t bring.
How shall I write this select?