Anyone having luck using cursors in SP?
Posted in 1999
Topics: Stored Procedures & SPL
Hi all, I'm trying to use a cursor in a stored procedure and have no luck at all, I get syntax errors -201on the line "declare cursor". Did anyone run into this? Thanks a lot, eugen
eugen daroczy wrote: > I'm trying to use a cursor in a stored procedure and have no luck > at all, I get syntax errors -201 on the line "declare cursor". > Did anyone run into this? Yes. Did you read the chapter on SPL in the reference manual? Where did you find it covering DECLARE? Answer: you didn't because it isn't valid SPL syntax -- hence the error message. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
HI Buddy, You need to use foreach statement in Stored Procedure. Foreach is equivalent of Cursor in Stored Procedure. Thanks, khem kchande@yahoo.com eugen daroczy <daroczy@msn.com> wrote in article <OpLwehOn#GA.254@cpmsnbbsa05>... > Hi all, > > I'm trying to use a cursor in a stored procedure and have no luck at all, I > get syntax errors -201on the line "declare cursor". Did anyone run into > this? > > Thanks a lot, eugen > > >