MySQL Forums
Forum List  »  Newbie

Re: Compare 2 fields in different tables using IF
Posted by: Peter Brawley
Date: February 16, 2018 09:51AM

Is this what you mean?

select ...
from tour_anal a
join tour_hdr h on ...
join tour_det d on ...
where h.diettour_type = if( h.paxno=d.paxno,'TourHdr', 'TourSet') ...

Options: ReplyQuote


Subject
Written By
Posted
Re: Compare 2 fields in different tables using IF
February 16, 2018 09:51AM


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.