procedure TForm1.Edit1Change(Sender: TObject);
begin
if edit1.Text ='' then begin
Query1.Active:=false;
Query1.SQL.Clear;
Query1.SQL.Add('select descripcion from tabla1');
Query1.ExecSQL;
Query1.Active:=true;
Query1.Refresh;
end
else begin
Query1.Active:=false;
Query1.SQL.Clear;
Query1.SQL.Add('select descripcion from tabla');
Query1.SQL.Add('where descripcion like '+QuotedStr('%'+edit1.Text+'%'));
Query1.SQL.Add(' or upper(descripcion) like upper('+QuotedStr('%'+edit1.Text+'%')+')');
Query1.ExecSQL;
Query1.Active:=true;
Query1.Refresh;
end;
end;