Subject | Passing a list of parameters to a query |
---|---|
Author | |
Post date | 2015-12-24T14:41:21Z |
Hi,
when I define a query as such:
Select ID, Value from Table where ID in (1,2,3)
this works w/o a problem.
Yet, when I define the query as
Select ID, Value from Table where ID in (:List)
and try to pass the list with ...ParamByName('List').AsString := '1,2,3', I get an error message saying that '1,2,3' is not a valid integer value.
Is it possible to pass such a list to a query?
Florian
when I define a query as such:
Select ID, Value from Table where ID in (1,2,3)
this works w/o a problem.
Yet, when I define the query as
Select ID, Value from Table where ID in (:List)
and try to pass the list with ...ParamByName('List').AsString := '1,2,3', I get an error message saying that '1,2,3' is not a valid integer value.
Is it possible to pass such a list to a query?
Florian