Hello:
Is it possible to bind an in list?
Example:
select *
from table t
where t.id in (:idslist)
If yes, what would be the type of the parameter and what kind of value should I associate with it?
Thanks
binding an in list
Re: binding an in list
Hello,
You cannot use the IN function with parameters. Instead, you can use, for example, the INSTR function:
where parameter is set as
The "_" symbol can be replaced with any other symbol.
You cannot use the IN function with parameters. Instead, you can use, for example, the INSTR function:
Code: Select all
select * from dept
where INSTR( :p1, '_'||TO_CHAR(deptno)||'_') > 0
Code: Select all
OraQuery1.ParamByName('p1').AsString := '_10_20_30_';
Re: binding an in list
For now, I implemented it by replacing the parameter placeholder (i.e. :list) with the list of ids using the delphi StringReplace.