
14/06/2011, 07:21
|
 | Colaborador | | Fecha de Ingreso: agosto-2006 Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años, 6 meses Puntos: 774 | |
Respuesta: ayuda con consulta No seria mejor asi: select cl.id_cliente , cl.name , dr1.direccion1 , dr2.direccion1 from tabla_clientes cl
inner join tabla_direccion dr1 on cl.id_cliente = dr1.id_cliente
inner join tabla_direccion dr2 on cl.id_cliente = dr2.id_cliente
where cl.name like 'parte_nombre%' and (dr2.typo_direccion = 'work' and dr1.typo_direccion = 'home')
Saludos!
__________________ What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me |