
07/05/2008, 01:02
|
Colaborador | | Fecha de Ingreso: marzo-2008 Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 17 años Puntos: 574 | |
Re: problema consulta registros repetidos incluso utilizando disctinct
Código:
select DISTINCT u.nombre,u.app,
u.apm,
l.negocio_nombre,
t.ot,
t.numero_poliza,
t.tramite,
t.informacion,
s.fecha_ingreso,
o.Nombre_Lista,
s.fecha_standard,
s.estado,
s.fecha_terminacion,
uo.id_organizacion
from ((((USUARIO as u
INNER JOIN
TRAMITES as t
ON t.id_USUARIO=u.USUARIO_id)
INNER JOIN
LINEA_NEGOCIO as l
ON t.linea_negocio=l.negocio_id)
INNER JOIN
status as s
ON t.ot=s.ot_ext)
INNER JOIN
ORGANIZACIONES as o
ON o.??????? )
INNER JOIN
u_o as uo
ON uo.??????
where
t.organizacion=5;
Como se relacionan ORGANIZACIONES y u_o con el resto de tablas?
Tienes claro que DISTINCT se refiere a todo el registro no al id de ususario?
Quim |