Page 1 of 1

"in" statement

Posted: 14.02.2014, 10:02
by francisco
what is the best way to work with "in" statement, and zeos query?

example:
...
query.sql.add('where fieldname in (:field) ');
query.parambyname('field').AsIDontKnow := MaybeArray;

I currently have to concatenate the string, to do this...
is there a more elegant way than simply having to concatenate strings?

and excuse me if I say any bullshit...

Re: "in" statement

Posted: 27.06.2014, 23:39
by EgonHugeist
francisco,

don't know which provider you're using.. You could also try to use parameters '.... in [:P1, :P2......]. IF your changing your SQL all pareters are cleared and reassigned so you have a floating param-count. String-Concatation forces Zeos always to prepare a new stmt which leads to performance loss.

Michael