Subject | Re: RE: [firebird-support] Parametrized queries and execute statement - dynamic parameter list |
---|---|
Author | liviuslivius |
Post date | 2015-05-26T08:17:55Z |
>>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 ID=? OR ID=?
SELECT * FROM TABLE WHERE ID=? OR ID=? OR ID=?
then i got limited number of possible queries e.g 3 or 5 ...
>>SELECT SUM(Y.AAA) FROM TABLEY Y>>JOIN TMP_TABLE T ON Y.ID = T.ID>>and in your loop do>>INSERT INTO TMP_TABLE(ID) VALUES(:VAR_NR)>>HTH,>>Set
Temp table is good hint but in my reall case it is difficult because of changing number of columns and its types
I suppose that specify dynamic list of parameter values in current FB implementation is not supported or may be it is?
regards,
Karol Bieniaszewski