Subject | Parameter in 'in' clause? |
---|---|
Author | Oliver Sturm |
Post date | 2002-06-19T12:11:22Z |
Hi!
Is there a way to have a parameter for an 'in' clause that expands to a
string? Here's what I mean: I have a dialog that lets the user select a
number of depots from a list. I'd like a query that gets further information
about these depots from a table (or several in reality). This could look like
select id, info from tbl_info
where id in (:ids)
Now, I'd like to construct a string like '1, 3, 5' programatically and use
it for the parameter:
quInfo.ParamByName ('ids').AsString := '1, 3, 5';
Is there a way to do this or something similar enough to be helpful?
Oliver Sturm
--
Fa. Manfred Dahlhoff - Buellenkothenweg 37a - 40229 Duesseldorf
Tel.: 0211-2202821 - Fax: 0211-2202822 - http://www.Manfred-Dahlhoff.de
Is there a way to have a parameter for an 'in' clause that expands to a
string? Here's what I mean: I have a dialog that lets the user select a
number of depots from a list. I'd like a query that gets further information
about these depots from a table (or several in reality). This could look like
select id, info from tbl_info
where id in (:ids)
Now, I'd like to construct a string like '1, 3, 5' programatically and use
it for the parameter:
quInfo.ParamByName ('ids').AsString := '1, 3, 5';
Is there a way to do this or something similar enough to be helpful?
Oliver Sturm
--
Fa. Manfred Dahlhoff - Buellenkothenweg 37a - 40229 Duesseldorf
Tel.: 0211-2202821 - Fax: 0211-2202822 - http://www.Manfred-Dahlhoff.de