I have the following table
ID UpdatedDate
--- ------------
1 2013-03-04 08:05:07.203
2 2013-03-04 07:05:07.203
3 2013-03-05 10:05:07.203
Now I want to show records only which occur after 8.oo AM today only.
for that I am doing as following
select * from tab
where
LastUpdatedDate > GETDATE()
and datepart(hh, LastUpdatedDate) >= 8
the issue occurs if I run this query after the time mentioned in the updatedDate.
in that case LastUpdatedDate > GETDATE()
fails and returns nothing.
Any idea on how to go about this issue?