I have issue with one of my queries. That query work fine for ages, but suddenly stop works and giving me SQLCODE 100 in the routine.
&SQL(SELECT * FROM (
SELECTeventFROM dhr_log_lasers.production WHERE createDateUTC >= DATEADD(dd, -5, CURRENT_DATE) AND kiosk = :%var("kioskID") GROUP BY machine
HAVING ID = MAX(ID)
) WHERE event != 2
)If I copy this same query to the management portal and replace variable with real ID I will get back 6 or more rows.



