I have a problem in select the all count value list to table using SQL CE.
SELECT Time AS Hour,Cast (COUNT(ReceivedTime)*1.0/(10)as decimal(16,2)) AS HourlyTotal
LEFT OUTER JOIN tblMessageReceived ON Time = ReceivedTime
WHERE ReceivedDateTime >= '2016-01-01' AND ReceivedDateTime <= '2016-07-07'
GROUP BY Time
WHERE clause effectively turns your
LEFT JOIN into an
INNER JOIN. The solution is to put them in the
SELECT t.Time AS Hour, CAST(COUNT(t.ReceivedTime)*1.0/(10) AS DECIMAL(16, 2)) AS HourlyTotal FROM tblTime t LEFT OUTER JOIN tblMessageReceived tmr ON t.Time = tmr.ReceivedTime AND tmr.ReceivedDateTime >= '2016-01-01' AND tmr.ReceivedDateTime <= '2016-07-07' GROUP BY t.Time