Subject | Re: Miltiple rows in singleton select |
---|---|
Author | Santiago |
Post date | 2003-10-30T20:14:53Z |
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:
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,
>
> 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