Hi,
I am lost again in SQL programming...
Last year I posted this question
I am now trying to take the days I have rain logged from this query GMMastros gave me...
This query results are all the days that rain is logged.
How do I get the data of every hour of a day that rained?
Thanks
I am lost again in SQL programming...
Last year I posted this question
I am now trying to take the days I have rain logged from this query GMMastros gave me...
Code:
SELECT FTBL_RainGauge.DateAndTime, ROUND(FTBL_RainGauge.Val, 3) AS val
FROM FTBL_RainGauge INNER JOIN
(SELECT TagIndex, DateAdd(Day, DateDiff(Day, 0, DateAndTime), 0) AS Date, MAX(DateAndTime) AS LastRecordedRainFall
FROM FTBL_RainGauge
WHERE Val > 0 AND tagindex = '0' AND dateandtime > '12-1-2008'
GROUP BY TagIndex, DateAdd(Day, DateDiff(Day, 0, DateAndTime), 0)) AliasName ON FTBL_RainGauge.TagIndex = AliasName.TagIndex AND
FTBL_RainGauge.DateAndTime = AliasName.LastRecordedRainFall
ORDER BY FTBL_RainGauge.DateAndTime DESC
This query results are all the days that rain is logged.
How do I get the data of every hour of a day that rained?
Thanks