Subject Re: [firebird-support] Re: Stored Procedure question
Author Martijn Tonies
> 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 ?

What would be the purpose of the SUSPEND statement?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com