ms access - Excluding certain values in SQL output -
i want find room code of lectures of 100 or more capacity , free (i.e. not booked) on tuesday @ 12pm.
data stored in roombooking
table, has:
bookingid
roomcode
modulecode
dayreq
timereq
semester
classsize
my query far:
select rcode, capacity room inner bring together roombooking on room.rcode = roombooking.roomcode capacity >= 100;
i tried utilize not exists clause, not right. goal exclude rooms booked @ tuesday @ 12pm.
try this:
select rcode, capacity room left bring together roombooking on room.rcode = roombooking.roomcode , roombooking.dayreq = 'tuesday' , -- prepare right value roombooking.timereq = '12:00' -- prepare right value capacity >= 100 , roombooking.bookingid null -- exclude rooms bookings on date/time
sql ms-access
No comments:
Post a Comment