MySQL Forums
Forum List  »  Views

Re: (reverse) join
Posted by: Roger Ottani
Date: March 12, 2014 11:48AM

the only solution wich I've found is to use a UNION clauses:

SELECT ServA.idS, ServA.service_code, ServA.type
FROM ServA
LEFT JOIN ServErog
On ServErog.servtype = Serv.type AND ServErog.typeid = Serv.idS
WHERE ServErog.idSE IS NULL

UNION

SELECT ServA.idS, ServA.service_code, ServA.type
FROM ServA
LEFT JOIN ServErog
On ServErog.servtype = Serv.type AND ServErog.typeid = Serv.idS
WHERE ServErog.idSE IS NULL

ecc ecc

is not what I wanted but it works!

Options: ReplyQuote


Subject
Views
Written By
Posted
5728
March 12, 2014 08:53AM
1761
March 12, 2014 09:42AM
1759
March 12, 2014 09:51AM
Re: (reverse) join
1817
March 12, 2014 11:48AM
1874
March 12, 2014 01:11PM
2027
March 13, 2014 03:23AM
1750
March 13, 2014 10:35AM


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.