using parameter by where clause in ()
Posted: Thu 03 Nov 2011 09:42
I want to use a parameter to findsome records.
Normally the query look likes this : 'select * from table where id in (1,2,3)', it wil gives the asked records.
In Delphi I use a parameter:
This results in: 'select * from table where id in ('1,2,3')'
Is there a way to get the proper value (1,2,3) when I use Params?
Normally the query look likes this : 'select * from table where id in (1,2,3)', it wil gives the asked records.
In Delphi I use a parameter:
Code: Select all
Myquery1.SQL.Text := from table where id in (:id);
MyQuery1.Params[0].Value := eparams.text;
Is there a way to get the proper value (1,2,3) when I use Params?