Hi,
I'm a new to sql so forgive me if this is really basic
I've made a database for booking workspaces for a date, start time and end time. I have written a query that the user selects a workspace, date, start time and end time. Having converted the date and time into timestamps that look like yyyymmddhhmmss I can do a select on the booking for spaces that have bookings between the start and end time stamps. If eof then the space is not booked or there is no conflicting bookings so allow the booking request.
Now I have been asked to show all of the available spaces from a user's selected date starttime and endtime but I can't think how using Sql. I have an earlest available of 7am and latest available time of 7pm that a booking can be booked and the booking can only last for a day max. Can anyone tell me the best way of getting the available bookings.
Thanks,
Garry
I'm a new to sql so forgive me if this is really basic
I've made a database for booking workspaces for a date, start time and end time. I have written a query that the user selects a workspace, date, start time and end time. Having converted the date and time into timestamps that look like yyyymmddhhmmss I can do a select on the booking for spaces that have bookings between the start and end time stamps. If eof then the space is not booked or there is no conflicting bookings so allow the booking request.
Now I have been asked to show all of the available spaces from a user's selected date starttime and endtime but I can't think how using Sql. I have an earlest available of 7am and latest available time of 7pm that a booking can be booked and the booking can only last for a day max. Can anyone tell me the best way of getting the available bookings.
Thanks,
Garry