Subject Re: [firebird-support] behavior of select into in a result with > 1 record
Author Helen Borrie
At 02:32 PM 10/09/2003 +0200, you wrote:
>Hi,
>
> > "select anythink from table into :anythink"
> > what happen if my select return more than one records ?
> > The first will be used and assigned to my variable?

Martijn wrote:

>You will receive an error - something along the lines of
>"Multiple rows returned in a singleton select".

If you *want* to get multiple rows back, use a FOR SELECT...INTO
<variables> DO....SUSPEND and submit your request using a SELECT ... FROM
procedurename (parameter_list) statement instead of EXECUTE PROCEDURE
procedurename (parameter_list).

"Selectable stored procedures".
Language Reference, IB 6 beta docs for more information; also papers from
the ibphoenix website.

heLen