MySQL Forums
Forum List  »  Spanish

Re: Demora excesiva en una consulta
Posted by: Jesús Uzcanga
Date: September 06, 2013 02:05PM

Andres.

Nunca dijiste ¿Qué quieres hacer? con la consulta. Esto es muy importante para poder ayudarte.

Viéndola pareciera que quieres algo así como conseguir los datos del último contacto de un cliente.

Yo te recomendaría lo siguiente:

SELECT Cliente.CodCliente,Contacto.CodCliente,MAX(CodContacto) FROM Cliente

INNER JOIN Contacto ON Cliente. CodCliente = Contacto.CodCliente

GROUP BY CodCliente

___________________________
Ing. Jesús Alfredo Uzcanga
Twitter: @JesusUzcanga

We learn the 20% of what we HEAR,
the 50% of what we SEE,
the 80% of what we DO and
the 95% of what we TEACH.

____________________________________________________________
https://www.linkedin.com/in/jauzcanga/

Options: ReplyQuote


Subject
Views
Written By
Posted
3772
September 06, 2013 07:08AM
Re: Demora excesiva en una consulta
1169
September 06, 2013 02:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.