Subject Re: Stored Procedure question
Author Michael Vilhelmsen
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> > Hi
> >
> > I have made a procedure that can set statistics.
> > Its like this:
> >
> > CREATE PROCEDURE PSETSTAT
> > AS
> > DECLARE VARIABLE S VARCHAR(200);
> > begin
> > FOR SELECT RDB$INDEX_NAME
> > from rdb$indices
> > into :s
> > do
> > begin
> > s='SET STATISTICS INDEX '||s||';';
> > execute statement :s;
> > end
> > suspend;
> > end
> >
> >
> > Works fine.
> > What I would like it to do besides setting statistics, is
returning
> > the value of S each time it changes so I can give some
information to
> > the user.
> > Is this posible from a stored procedure like this?
> >
> > Thank you
> >
> > Michael
>
> just make s a returning variable and use select * from psetstat


It seems as if I only gets the last value returned to me....

Michael