grazie a tutti,
ho risolto cosi:
var
QueryLeft, QueryParam : string ;
begin
QueryLeft := 'SELECT * FROM Tabella where nome';
if radiobutton1.Checked then
QueryParam := ' = :ParCodice ORDER BY cognome,nome'
else
QueryParam := ' like :ParCodice ORDER BY cognome,nome';
IBQuery1.SQL.Text := QueryLeft + QueryParam ;
if radiobutton1.Checked then
IBQuery1.ParamByName('ParCodice').AsString := Edit1.Text
else
IBQuery1.ParamByName('ParCodice').AsString := '%'+Edit1.Text+'%';
IBQuery1.Open;
![]()