• The definition was a typo, actually it is in a table with datetime columns.

    Your previous day code works fine with specified vendorid and specified schedid, but i am having trouble getting the resultset for ALL matching vendorid and schedid in the Book table.

    Right now I am trying to only find the free spaces for only the dates there were bookings for matching vendor and schedid.I can do an union all at the end with this (free spaces) resultset to display free and booked spaces for all vendorid and schedids ,hope it makes sense to you.