Subject Re: [firebird-support] Dynamic Stored Procedure
Author Moegamat Alexander
Hi

I thought that by replacing that lame code with the very lean code
below now I get an "Expression evaluation not supported error"

Mayby I need to this in two steps no?

M

stmnt1 = 'select :docsusufix+GEN_ID(DOCTYPE'+:SALESTYPE_in+',1) from
dual';
for execute statement :stmnt1 into :newdocid do
begin
/* */
end

>>> "Moegamat Alexander" <alexanderm@...> 2008/03/05 04:23:51 pm
>>>
Ooops Sorry the FB version 203 Win32 Build

>>> "Martijn Tonies" <m.tonies@...> 2008/03/05 04:19:29 pm >>>
Hi,

It depends on your version of Firebird, but you didn't mention the
version you're using.

Firebird 1.5 has [FOR] EXECUTE STATEMENT that can be
used to execute dynamic SQL in PSQL code.

Take a look at the Release Notes.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB,
Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com