Subject | Re: Miltiple rows in singleton select |
---|---|
Author | Santiago |
Post date | 2003-10-30T20:36:01Z |
Thank you very much Fred !!!
--- In firebird-support@yahoogroups.com, "Wilson, Fred"
<fred.wilson@b...> wrote:
051153
attogy
--- In firebird-support@yahoogroups.com, "Wilson, Fred"
<fred.wilson@b...> wrote:
> You have to use:a suspend
> " FOR Select
> .....
> .....
> ....
> INTO
> ....
> ....
> ....
> ....
>
> Do
> Begin
> SUSPEND;
> End
>
>
> So, you need to use "FOR SELECT" instead of SELECT, *and* you need
> statement between each row that's to be return.parameters
>
>
> Best regards,
> Fred Wilson
> SE, Böwe Bell & Howell
> fred.wilson@b... <mailto:fred.wilson@b...>
>
>
>
>
> -----Original Message-----
> From: Santiago [mailto:gnajar@g...]
> 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
> to it, indicating the sort order. Of course, the select statementresult
> 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
> of a select statement in it?<http://rd.yahoo.com/M=244522.3707890.4968055.1261774/D=egroupweb/S=17
>
> 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
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
>
051153
>86:HM/A=1595055/R=0/SIG=124j83ehr/*http://ashnin.com/clk/muryutaitaken
attogy
> o?YH=3707890&yhad=1595055> Click Here!M=244522.3707890.4968055.1261774/D=egroupmai
>
> <http://us.adserver.yahoo.com/l?
> 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]