Syntax error in stored procedure
Posted in 2005
Topics: Stored Procedures & SPL, Server Administration
Hi, I have problems with one stored procedure that I am trying to
develop in my informix database.
The procedure is at folloews
create procedure updateFlags(emp LIKE employee.idEmployee,check like
dailycheck.checkdate)DEFINE selected integer;
FOREACH cursor FOR select first 1 iddailycheck
into selected 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 where iddailycheck=selected; end foreach;
end procedure;
I am using dbaccess, what the result is always the same....
Can you help me????
loose the ; at
> FOREACH cursor FOR select first 1 iddailycheck
> into selected from dailycheck DC
> where DC.idEmployee=emp and DC.checkdate=check
> and DC.modificationtype='PLANNED' order by
> DC.modificationdate desc;
-------------------------^^---HERE-------
see you
Superboer.
Unholy schreef:
> Hi, I have problems with one stored procedure that I am trying to
> develop in my informix database.
>
> The procedure is at folloews
>
> create procedure updateFlags(emp LIKE employee.idEmployee,check like
> dailycheck.checkdate)> DEFINE selected integer;
> FOREACH cursor FOR select first 1 iddailycheck
> into selected 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 where iddailycheck=selected;> end foreach;
>
> end procedure;
>
> I am using dbaccess, what the result is always the same....
>
> Can you help me????