Subject RE: [firebird-support] Stored Procedure question
Author Alan McDonald
> 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

Alan