Subject | Re: [firebird-support] SP not returning a table |
---|---|
Author | Helen Borrie |
Post date | 2007-04-26T11:35:23Z |
At 07:58 PM 26/04/2007, you wrote:
select * from mytable (SomeValidInput) that is
just what will happen...provided, of course, that
you gave her a container for it in her application.
It REALLY is time for you to grit your teeth and
read that documentation, Alejandro.
./heLen
>But the only way to show the result set as aWell, if your end user does
>table in InterBase 7.5 is doing a SELECT at the client side?
> I'd look like a superstar if my end user runs
> the procedure and it outputs the result set as
> a table without having to run a SELECT
select * from mytable (SomeValidInput) that is
just what will happen...provided, of course, that
you gave her a container for it in her application.
It REALLY is time for you to grit your teeth and
read that documentation, Alejandro.
./heLen
>Helen Borrie <helebor@...> escribió:
> At 03:02 AM 25/04/2007, you wrote:
> >I've finished a stored procedure and I need it to return mytable
> >(that I modify in the stored procedure) so I just added a SELECT *
> >from mytable as the last line of the stored procedure but I'm
> >getting an error:
> >
> > SQL error code = -104.
> >Token unknown - line 74, char 22.
> >;.
> >
> > But a table can't be an output parameter of a SP, should I
> > execute the SP and then show mytable doing the SELECT outside the SP?
>
>How much do you know about selectable stored procedures in Firebird
>PSQL? Do you understand that different database engines do
>procedural SQL in different ways?
>
>In SQL you don't "output tables" at all. You output SETS. In
>Firebird PSQL you can create a set inside your SP and then, on the
>client side, SELECT it as though it were a table.
>
>create procedure mytable (input1 integer, {etc.})
>returns (
>mt1 integer,
>mt2 varchar(20),
>mt3 {etc.} )
>as
>begin
>for select field1, field2, field3 from atable
>where ...
>order by ...
>into :mt1, :mt2, :mt3, {etc.}
>do
>begin
>{do whatever you need to the data};
>suspend;
>end
>end
>
>./heLen
>
>
>
>
>
>---------------------------------
>
>LLama Gratis a cualquier PC del Mundo.
>Llamadas a fijos y móviles desde 1 céntimo por minuto.
>http://es.voice.yahoo.com
>
>[Non-text portions of this message have been removed]
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://www.firebirdsql.org and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>