Subject | Re: [firebird-support] Re: Stored Procedure question |
---|---|
Author | Martijn Tonies |
Post date | 2004-09-14T14:12:20Z |
> Could I do this way also:What would be the purpose of the SUSPEND statement?
>
> 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 ?
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com