Ver Mensaje Individual
  #8  
Antiguo 29-09-2004
[basti] basti is offline
Miembro Premium
 
Registrado: ago 2004
Posts: 388
Reputación: 20
basti Va por buen camino
Creo que el problema está en poner todas las tablas en el FROM. Al hacer esto se van a repetir los resultados tantas veces como (por ejemplo) materias existan. Si pasas las tablas al LEFT JOIN no se debería de repetir.

Algo así:

Código SQL [-]
 Select DatosPersonales_id, DAT_Apellido + ', ' + DAT_Nombres,ASI_id_Profesor,ASI_HoraEntrada,ASI_FechaEntrada,
 MPR_Dia, MPR_Division
 From  Asistencia.db,Profesores.db
 left outer JOIN DatosPersonales.db on
   pro_id_DatosPersonales = DatosPersonales_id
 left outer join MateriaProfesor.db on
   MPR_id_Profesor = Profesores_id
 left outer join Materias.db on
   MPR_id_Materia = Materias_Id
 where   ASI_id_Profesor = Profesores_id
     and  ASI_FechaEntrada = '09/09/2004' 
     and  MPR_Dia = 'Jueves'
     and PRO_Condicion0 = 'A'
     and  MPR_Turno = 'T'

Un saludo
Responder Con Cita