yep you need to create a table on the fly and use it like this;With HourTable (HourDt)AS(SELECT DATEADD(HOUR, DATEDIFF(HOUR,0,sysdatetime())-48,0)UNION ALLSELECT DATEADD(HOUR,1,HourDt)FROM HourTable WHERE DATEADD(HOUR,1,HourDt)<=sysdatetime())SELECT HourDt,COALESCE(Cnt,0)FROM HourTable hLEFT JOIN (select count(*) AS Cnt, DATEADD(hh,DATEDIFF(hh,0,myDateTime),0) AS DateHourfrom myTable where myDateTime > DATEADD(HOUR, -48, sysdatetime()) Group by DATEADD(hh,DATEDIFF(hh,0,myDateTime),0))tON t.DateHour = h.HourDt
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/