Subject | Re: Stored Procedure question |
---|---|
Author | Michael Vilhelmsen |
Post date | 2004-09-14T14:03:47Z |
Could I do this way also:
Create a procedure like this:
CREATE PROCEDURE PSETSTAT2 (
IDXNAME VARCHAR(200))
AS
DECLARE VARIABLE S VARCHAR(200);
begin
s='SET STATISTICS INDEX '||IDXNAME||';';
execute statement :s;
suspend;
end
Then have a Query doing:
SELECT RDB$INDEX_NAME
from rdb$indices
Then open my query, doing NEXT until end of file, and for each record
calling the SP PSETSTAT2 ?
Michael
Create a procedure like this:
CREATE PROCEDURE PSETSTAT2 (
IDXNAME VARCHAR(200))
AS
DECLARE VARIABLE S VARCHAR(200);
begin
s='SET STATISTICS INDEX '||IDXNAME||';';
execute statement :s;
suspend;
end
Then have a Query doing:
SELECT RDB$INDEX_NAME
from rdb$indices
Then open my query, doing NEXT until end of file, and for each record
calling the SP PSETSTAT2 ?
Michael