MySQL Forums
Forum List  »  Spanish

Re: no entiendo como hacer esta consulta con SELECT
Posted by: Jesús Uzcanga
Date: June 20, 2014 01:26PM

Nones,

en primer lugar supondré que cuando colocaste:

"tabla2.cp1 = tabla2.cp2 "

Realmente quisiste colocar:

tabla1.cp1 = tabla2.cp2

De ser así, tienes varias soluciones pero la que acostumbro a utilizar es algo similar a esto:

SELECT tabla1.cp1
INNER JOIN tabla2 ON tabla2.cp2 = tabla1.cp1 AND tabla2.cp2 <> 1

Prueba a ver si te sirve...

___________________________
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
Re: no entiendo como hacer esta consulta con SELECT
911
June 20, 2014 01:26PM


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.