Is it possible to execute/open a query which needs one parameter that gets used multiple times?
e.g:
Code: Select all
select * from Table
where ColA = :Par1
and ColB = :Par1MyQuery.ParamByName('Par1').AsString:= 'Value';
The second parameter is Null or not provided.
I know I can work around by making them two different params which hold the exact same value (:Par1&:Par2), or using MySQL variables.
But I need to know if it's possible to reuse that only one parameter, multiple times just by passing one line value and all occurrence of the parameter in the query gets evaluated to that value.
i.e:
Code: Select all
select * from Table
where ColA = :Par1
and ColB = :Par1To make the query like:
Code: Select all
select * from Table
where ColA = 'Value'
and ColB = 'Value'