Subject | Re: [firebird-support] Re: Little pb with suspend |
---|---|
Author | Martijn Tonies |
Post date | 2004-03-10T11:34:06Z |
Hi,
one row of data. Does it do that? If not, I'd
say the
" for select idpilote
"IF" statement.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> No it doesn'tFrom reading the source, I'd say it should return
> Thanks for reply,
one row of data. Does it do that? If not, I'd
say the
" for select idpilote
> > > from affectationdoesn't return any data, which conflicts with your
> > > where
> > > idpilote=:pilotenum"
"IF" statement.
> > >With regards,
> > > Alter procedure nb_affectation(pilotenum smallint)
> > > returns(pilnb smallint,nb_aff smallint)
> > > as
> > > declare variable tour smallint;
> > > begin
> > >
> > > nb_aff=0;
> > > if ((pilotenum is null) OR (not exists (select 1 from pilote where
> > > idpilote=:pilotenum))) then
> > > exception data_error;
> > > else
> > > begin
> > >
> > > for select idpilote
> > > from affectation
> > > where
> > > idpilote=:pilotenum
> > > into : piln
> > > do
> > > begin
> > > nb_aff=nb_aff + 1;
> > > end
> > >
> > > suspend;
> > >
> > > end
> > > end !!
> > > set term; !!
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com