Ver Mensaje Individual
  #7  
Antiguo 19-01-2015
Catublipas Catublipas is offline
Miembro
NULL
 
Registrado: ene 2015
Posts: 55
Reputación: 12
Catublipas Va por buen camino
Perdona las comas las he puesto yo, pero ya tengo la solución(aunque tengo un problema):

Código Delphi [-]
procedure TPrueba1Form.Button1Click(Sender: TObject);
begin
  IBQuery1.Close;
  IBQuery1.Open;
  IBQuery2.Close;
  IBQuery2.Open;
  ClientDataSet1.Open;
  while not IBQuery1.eof do
  begin
    while not IBQuery2.eof do
    begin
      ClientDataSet1.Append;
      if IBQuery1.FieldByName('PROYECTO').Value = IBQuery2.FieldByName('PROYECTO').Value then
      begin
        ClientDataSet1.FieldByName('PROYECTO').Value:= IBQuery1.FieldByName('PROYECTO').Value;
        ClientDataSet1.FieldByName('FACTURA').Value:= IBQuery2.FieldByName('DOCNUM').Value;
        ClientDataSet1.post;
      end;
      IBQuery2.next;
    end;
    IBQuery1.next;
    IBQuery2.First;
  end;
end;

Mi problema ahora es que es extremadamente lento(10 segundos).¿Se te ocurre algo?
Y estoy contigo, es una enorme chapuza, y porque no has visto la base de datos, si no te daría algo.
De todas formas muchas gracias de nuevo!
Responder Con Cita