Re: Syntax error in stored procedure
Posted in 2005
Topics: Stored Procedures & SPL
It need another ; after the first one???
Unholy try this:
create procedure updateFlags(emp LIKE employee.idEmployee,check like
dailycheck.checkdate)DEFINE selected integer;
DEFINE dummydate like dailycheck.modificationdate;
FOREACH cursor FOR select first 1 iddailycheck, modificationdate
into selected , dummydate from dailycheck DC
where DC.idEmployee=emp and DC.checkdate=check
and DC.modificationtype='PLANNED'
order by DC.modificationdate desc
update dailycheck set lastPlanned=1 whereiddailycheck=selected;
end foreach;
end procedure;
have added dummydate since you order by modificationdate
and just compiled and executed it on 930.
have fun
Superboer.