Ver Mensaje Individual
  #2  
Antiguo 13-08-2005
Avatar de Sotrono
Sotrono Sotrono is offline
Miembro
 
Registrado: abr 2004
Ubicación: Buenos Aires - Argentina
Posts: 396
Reputación: 21
Sotrono Va por buen camino
Hola, conozco dos metodos, yo utilizo el primero.

Código Delphi [-]
   With Query1 do
   begin
     Active:= false;
     SQL.Clear;
     SQL.Add('SELECT Alquileres.IdAlquiler,' +
                    'Peliculas.Nombre,' +
                    'Alquileres.Fecha_Alquiler,' +
                    'Alquileres.Fecha_Devolucion ' +
                    'FROM Socios INNER JOIN (Alquileres INNER JOIN Peliculas '+
                    'ON Alquileres.IdPelicula = Peliculas.IdPelicula) ' +
                    'ON Alquileres.IdSocio = Socios.IdSocio;'
            );
     Active:= true;
   end;

Código Delphi [-]
  Query1.Active:= false;
   with Query1.SQL do
   begin
     Clear;
     Add('SELECT Alquileres.IdAlquiler,');
     Add('Peliculas.Nombre,');
     Add('Alquileres.Fecha_Alquiler,');
     Add('Alquileres.Fecha_Devolucion ');
     Add('FROM Socios INNER JOIN (Alquileres INNER JOIN Peliculas ');
     Add('ON Alquileres.IdPelicula = Peliculas.IdPelicula) ');
     Add('ON Alquileres.IdSocio = Socios.IdSocio;');
   end;
   Query1.Active:= true;
Responder Con Cita