Subject | Stored Procedure question |
---|---|
Author | Michael Vilhelmsen |
Post date | 2004-09-14T11:53:05Z |
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
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