Re: RE: [firebird-support] Parametrized queries and execute statement - dynamic parameter list

2015-05-26 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
>>Here you change the SQL for each iteration, hence I cannot see how it would >>be possible to prepare only once. What you could try, is to use a temporary >>table, change your statement to:    Simple if after "iteration" query look like   SELECT * FROM TABLE WHERE ID=? SELECT * FROM TABLE WHERE

RE: [firebird-support] Parametrized queries and execute statement - dynamic parameter list

2015-05-26 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>3. when i change proc to use execute statement with parameters >  >SET TERM ^ ; >CREATE PROCEDURE MY_PROC_CALC_EXEC_PARAM(ID INTEGER) RETURNS(SUM_AAA INTEGER) >AS >DECLARE VARIABLE VAR_SQL VARCHAR(1000); >BEGIN > VAR_SQL = 'SELECT SUM(AAA) FROM TABLEY WHERE ID=:ID'; >  EXECUTE STATEMENT (VAR_SQL)