I'm trying to create a daily report and I need some kind of date control. I want it to show only yesterday 11am to today 11am, so between those two times only. Thanks because I'm quite stuck.
SELECT * DATEADD(d,DATEDIFF(d,0,GETDATE()), 11:00:00.000'), DATEADD(d,DATEDIFF(d,0,GETDATE()), 11:00:00.000')-1 FROM Table1 WHERE name = "John" ORDER BY * go