cdr@xteam.co.at (Chris Drauch) writes:
>
> It's easy to use the SPL as
>
> select name, call_number (state,phone) from ....>
> if the SP 'call_number' is returning just **one** value.
>
> But how to do if there is more than one? Using DB-Access I've got:
>
> -686 Procedure procedure-name has returned more than one row.
>
> A procedure returned more than one row of values (for
> example, it executed RETURN... WITH RESUME) when the
> caller expected only one row of values.
>
> Any hints?
>
> --
Chris:
You need to put your SQL statement in a FOREACH loop:
Such as
FOREACH
Select col1, col2,col3 ....
Return var1,var2,var3 WITH RESUME;
END FOREACH
The "WITH RESUME" statement is very important as it tells
Informix to go back for more data after the first select.
HTH,
Matt Ferris
Objects, Incorporated.