Hi,
I'm having trouble with a union query, I've got two queries which I want to combine into one and produce the output
Time_Slot AWOL Paid_Holidays
however the code below just produces: -
Time_Slot AWOL
Not showing the results from the second SELECT statement after the UNION, any suggestions why?
Thanks in advance
I'm having trouble with a union query, I've got two queries which I want to combine into one and produce the output
Time_Slot AWOL Paid_Holidays
however the code below just produces: -
Time_Slot AWOL
Not showing the results from the second SELECT statement after the UNION, any suggestions why?
Thanks in advance
Code:
SELECT qry2CountOfAllBookedSlots.Time_Slot, qry2CountOfAllBookedSlots.Total_Bookings AS AWOL
FROM qry2CountOfAllBookedSlots
WHERE (((qry2CountOfAllBookedSlots.Booking_Date)=[Forms]![frmBookingTypeCountAllCombined]![EnterDate]) AND ((qry2CountOfAllBookedSlots.Booking_Type)="AWOL"))
UNION ALL SELECT qry2CountOfAllBookedSlots.Time_Slot, qry2CountOfAllBookedSlots.Total_Bookings AS Paid_Holidays
FROM qry2CountOfAllBookedSlots
WHERE (((qry2CountOfAllBookedSlots.Booking_Date)=[Forms]![frmBookingTypeCountAllCombined]![EnterDate]) AND ((qry2CountOfAllBookedSlots.Booking_Type)="Paid Holiday"))
GROUP BY qry2CountOfAllBookedSlots.Time_Slot, qry2CountOfAllBookedSlots.Total_Bookings;