Please help.
I have rain gauges that record how much rain fall is in any give time in my city. The tools that record the data in SQL sever record every minute for charting purposes, weather there is rain or not.
I am not good at writing SQL queries other then normal select,insert,delete, & update.
I need to get the last recorded rainfall of the day when there is rain and I do not know how to do.
I tried dateandtime > ('23:58:00') and get bad results as well
Val is rainfall in inches, so of course this has to be more then 0
Tagindex is the rain gauge ID
This code doesn't necessarily give me the last rain information of the day, I am lost.
Thanks,
Jason
I have rain gauges that record how much rain fall is in any give time in my city. The tools that record the data in SQL sever record every minute for charting purposes, weather there is rain or not.
I am not good at writing SQL queries other then normal select,insert,delete, & update.
I need to get the last recorded rainfall of the day when there is rain and I do not know how to do.
Code:
SELECT DISTINCT CONVERT(datetime, CONVERT(varchar, DateAndTime, 10)), Val
FROM FTBL_RainGauge
WHERE (Val > '0') AND (TagIndex = '1')
I tried dateandtime > ('23:58:00') and get bad results as well
Val is rainfall in inches, so of course this has to be more then 0
Tagindex is the rain gauge ID
This code doesn't necessarily give me the last rain information of the day, I am lost.
Thanks,
Jason