Warum verwendest du nicht Format?
Delphi-Quellcode:
var
strOrderBy :
string;
const
constSQLCode =
'
SELECT X' + #10 +
'
FROM Y' + #10 +
'
WHERE Z = :i_Z' + #10 +
'
ORDER By %s';
begin
strOrderBy := '
miep';
With IrgendEineQuery
do
begin
SQL.Text := Format(constSQLCode, [strOrderBy ]);
...
Open;
end;
end;