I have a statement in the stored procedure:
SELECT
IFNULL(UnitValue,0) INTO v_Pump_DayEnd_Value,
CONCAT(Dated,' ', Timed, ' - ', IFNULL(UnitValue, 0))
INTO
v_PumpEndValueAndTime, CustomName
FROM
DeviceSensorData
WHERE
(CustomName = 'PUMP' OR CustomName = 'PUMP A' OR CustomName = 'PUMP B')
AND SensorName LIKE '%Total%'
AND Device = v_DeviceID
AND Dated = DATE(NOW())
ORDER BY
ID DESC
LIMIT 1;
The error I get is
Error Code: 1327
Undeclared variable: CONCAT