I use FDquery(Firedac), Uniquery(UNidac) to query ms access database on delphi.
select asset &" - "& asset_n as nooot from t_komp
.
this query combines two columns without "-" sign.
NOTE: if I use ADoquery, this query works well.
I use FDquery(Firedac), Uniquery(UNidac) to query ms access database on delphi.
select asset &" - "& asset_n as nooot from t_komp
.
this query combines two columns without "-" sign.
NOTE: if I use ADoquery, this query works well.
Share Improve this question asked Jan 19 at 9:45 user578332user578332 3451 gold badge6 silver badges17 bronze badges 1 |1 Answer
Reset to default 1The failure might be due to using the character & employed by FireDAC to identify a macro: FireDAC Preprocessing Command Text - Substitution Variables.
You can try two approaches:
Set
ResourceOptions.MacroExpands
tofalse
.Modify your SQL query, depending on your DBMS, to:
select CONCAT(asset,' - ',asset_n) as nooot from t_komp
or
select CONCAT(CONCAT(asset,' - '),asset_n) as nooot from t_komp
&
is a special character for FireDac related to client side preprocessing. It denotes a substitution variable. Ref: docwiki.embarcadero.com/RADStudio/Sydney/en/… Try setting ResourceOptions.MacroExpand to false. – Brian Commented Jan 19 at 17:42