Ver Mensaje Individual
  #3  
Antiguo 19-11-2007
manora manora is offline
Registrado
 
Registrado: feb 2007
Posts: 2
Reputación: 0
manora Va por buen camino
utilizo las bandas correspondients body header, detail, footer en la consulta estan todos los datos q necesito de varias tablas la consulta es la sig


self.ZReadOnlyQuery1.Active:=false;
self.ZReadOnlyQuery1.SQL.Clear;
self.ZReadOnlyQuery1.SQL.Add( 'SELECT afiliado.*, prestataria.nombre, prestataria.nombre, prestacion.fecha, prestacion.pagado,');
self.ZReadOnlyQuery1.SQL.Add( 'prestacion_estudio.costo, estudio.descripcion, prestacion_estudio.fecha');
self.ZReadOnlyQuery1.SQL.Add( 'FROM prestataria INNER JOIN ((afiliado INNER JOIN prestacion ON afiliado.id_afiliado = prestacion.id_afiliado) ');
self.ZReadOnlyQuery1.SQL.Add( 'INNER JOIN (estudio INNER JOIN prestacion_estudio');
self.ZReadOnlyQuery1.SQL.Add( 'ON estudio.id_estudio = prestacion_estudio.id_estudio) ON prestacion.id_prestacion = ');
self.ZReadOnlyQuery1.SQL.Add( 'prestacion_estudio.id_prestacion) ON prestataria.id_prestataria = prestacion.[id _prestataria] where dni = '+self.Edit1.Text+'');
self.ZReadOnlyQuery1.Active:=true;
Responder Con Cita