Subject | RE: [firebird-support] Re: Miltiple rows in singleton select |
---|---|
Author | Wilson, Fred |
Post date | 2003-10-30T20:31:01Z |
You have to use:
" FOR Select
.....
.....
....
INTO
....
....
....
....
Do
Begin
SUSPEND;
End
So, you need to use "FOR SELECT" instead of SELECT, *and* you need a suspend
statement between each row that's to be return.
Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: Santiago [mailto:gnajar@...]
Sent: Thursday, October 30, 2003 1:15 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Miltiple rows in singleton select
More informtion:
I expect to use this stored proc for a report where I pass parameters
to it, indicating the sort order. Of course, the select statement
return more than one row: as I see in docimentation:
The SELECT statement must
return at most one row from the database, like a standard singleton
SELECT.
It means a stored proc can not return multiple records as the result
of a select statement in it?
Thank you,
Guillermo
--- In firebird-support@yahoogroups.com, "Santiago" <gnajar@g...>
wrote:
ADVERTISEMENT
<http://rd.yahoo.com/M=244522.3707890.4968055.1261774/D=egroupweb/S=17051153
86:HM/A=1595055/R=0/SIG=124j83ehr/*http://ashnin.com/clk/muryutaitakenattogy
o?YH=3707890&yhad=1595055> Click Here!
<http://us.adserver.yahoo.com/l?M=244522.3707890.4968055.1261774/D=egroupmai
l/S=:HM/A=1595055/rand=339170749>
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
" FOR Select
.....
.....
....
INTO
....
....
....
....
Do
Begin
SUSPEND;
End
So, you need to use "FOR SELECT" instead of SELECT, *and* you need a suspend
statement between each row that's to be return.
Best regards,
Fred Wilson
SE, Böwe Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: Santiago [mailto:gnajar@...]
Sent: Thursday, October 30, 2003 1:15 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Miltiple rows in singleton select
More informtion:
I expect to use this stored proc for a report where I pass parameters
to it, indicating the sort order. Of course, the select statement
return more than one row: as I see in docimentation:
The SELECT statement must
return at most one row from the database, like a standard singleton
SELECT.
It means a stored proc can not return multiple records as the result
of a select statement in it?
Thank you,
Guillermo
--- In firebird-support@yahoogroups.com, "Santiago" <gnajar@g...>
wrote:
> Hi,Yahoo! Groups Sponsor
>
> I have this stored procedure:
>
> PROCEDURE FACTURA_RELACION (
> PE_ORDEN SMALLINT)
> RETURNS (
> PRO_PAI_NOMBRE VARCHAR(30),
> FAC_NUMERO VARCHAR(20),
> FAC_FECHA DATE,
> PRO_NOMBRE VARCHAR(30),
> FAC_TOTALIMPORTE NUMERIC(9,2))
> AS
> begin
> if (pe_orden = 1) then
> begin
>
> select pro_PAI_NOMBRE,
> FAC_NUMERO,
> FAC_FECHA,
> PRO_NOMBRE,
> FAC_TOTALIMPORTE from factura_v
> order by pro_pai_nombre, FAC_FECHA
> into :pro_PAI_NOMBRE,
> :FAC_NUMERO,
> :FAC_FECHA,
> :pro_nombre,
> :FAC_TOTALIMPORTE;
>
> end
>
> end
>
> When I call it like:
>
> select * from factura_relacion(1)
>
> I get the following error:
> "multiple rows in singleton select"
>
> What does it mean? how can I fix it?
>
>
> Thank you,
> Guillermo
ADVERTISEMENT
<http://rd.yahoo.com/M=244522.3707890.4968055.1261774/D=egroupweb/S=17051153
86:HM/A=1595055/R=0/SIG=124j83ehr/*http://ashnin.com/clk/muryutaitakenattogy
o?YH=3707890&yhad=1595055> Click Here!
<http://us.adserver.yahoo.com/l?M=244522.3707890.4968055.1261774/D=egroupmai
l/S=:HM/A=1595055/rand=339170749>
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]