The following code throws this error from MySQL:
caused by GatewayException: ResultSet is from UPDATE. No Data.
caused by SQLException: ResultSet is from UPDATE. No Data.
SET @prev_value = -1;
SELECT ABS(SUM(a.curr_value - a.lag_value))
SELECT time_stamp, @prev_value AS lag_value, @prev_value:=value AS curr_value
WHERE tank_ndx = 1
ORDER BY time_stamp
) AS a
WHERE a.curr_value - a.lag_value < 0;
If I take out the SET statement it will run. Does anyone know of a workaround to this?
I have allowMultiQueries set to true and useAffectedRows set to false in the connection properties to the database.