Re: stored procedures
Posted in 2000
"rob1.smith" wrote:
> attached is the stored procedure and the table layout of the table that I am
> trying to update.
> I am getting a 201 : syntax error on the define x1 integer line.
> [...snip...]
>
> create procedure rental_1()
> -- Define user variables> define x1 integer default 1;
> define x2 char(8);
> -- Set variables
> let x1 = 1;
> FOREACH ordnum FOR
> select can_ordnum, can_status into x2, x1 from caninfo
> where can_status = 0;
> update caninfo set can_status = x1;> END FOREACH
> end procedure
>
> [...table schema omitted...]
Judging from the error, you are trying to use ISQL rather
than DB-Access to create the stored procedure.
Don't -- ISQL does not understand that stored procedures
contain more than one semi-colon.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>