Subject Re: [firebird-support] How to run a built select-statement in a procedure
Author Pavel Menshchikov
Hello Radovan,

RB> I need in a procedure to build a statement and then run it, for example
RB> like this:

RB> sele = 'SELECT ' || :col0 || ' AS Usek' || :fields || ' FROM ' ||
RB> :source || :cond || ' GROUP BY ' || :col0 || ' INTO ' || :fields2;
Look in FB 1.5.x doc folder for sql.extentions subfolder -
README.execute_statement is what you need. Or refer to the release
notes: it contains the correct syntax for EXECUTE STATEMENT too.


HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com