I had the problem with SQL sensors, that in case no result is found for the defined condition an error appeared.
In my case it is not wrong to have no recordset returned.
The solultion I figured out now is like this:
SELECT Sum = CASE WHEN SUM(PAGECOUNT) IS NULL THEN 0 ELSE SUM(PAGECOUNT) END FROM <Table> WHERE <condition>
This prevent the downtime error for empty resultset.
Is it the intended way for PRTG? Any other / easier solutions possible?