Open firebird-automations opened 10 years ago
Commented by: Sean Leyne (seanleyne)
It looks like your SELECT statement is wrong.
S = 'select cast(:"P1" as integer) from RDB$Database'; should read: S = 'select cast(:P1 as integer) from RDB$Database';
Also, shouldn't ("P1" := :P) read as ('P1' := :P)?
Commented by: Gorynich (gorynich)
select cast(:"P1" as integer) from RDB$Database
statement is wrong?
execute block ( "P1" smallint = :P1) returns ( R smallint(512)) as declare variable S varchar(512); begin for select cast(:"P1" as integer) from RDB$Database into :R do suspend; end
works properly
Commented by: @hvlad
I confirm that quoted parameter names is not supported by EXECUTE STATEMENT so far.
Submitted by: Gorynich (gorynich)
execute block (P smallint = :P) returns (R smallint) as declare variable S varchar(512); begin S = 'select cast(:"P1" as integer) from RDB$Database';
for execute statement(:S)("P1" := :P) into :R do suspend; end
Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements. Execute statement preprocess SQL error. Parameter name expected.