MySQL Forums
Forum List  »  MySQL Query Browser

Re: Query Assistance Needed
Posted by: irek kordirko
Date: January 24, 2012 05:11PM

Use union, in this way:

select schedid, start, end, desc, tid, loc1, loc2
from schedule 
where start >= now()
union all
select bookid , start, end, desc, tid, location, null loc2
from (
    select bookid , start, end, desc, tid, location
    from bookings b
    join lot on lot.lotid = b.lotid
    where start >= now()
)x
order by start

Options: ReplyQuote


Subject
Written By
Posted
January 24, 2012 12:37PM
Re: Query Assistance Needed
January 24, 2012 05:11PM
January 24, 2012 06:52PM
February 07, 2012 03:49AM


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.