Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 11th, 2004, 03:27 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Double Booking System URGENT help needed!

Hey every1 - i am having a lot of trouble with this and any help would be much appreciated. I have an access 2003 database that i have created which is used primarily as a booking system for villas. I want to be able to design a system that prevents me from making a double booking. I have been advised that the best way of doing this is with a query. In english, i want the following out of my query:

Search through tblRentals for PropertyID that has just been entered

If the start date that has just been entered is >= to the start of any booking for this property, and the end date is <= to the end of any booking for this property, then display a message box "property double booked" and don't save any data.

OR

If the start date that has just been entered is <= to the start of any booking for this property, and the end date is >= to the end of any booking for this property, then display a message box "property double booked" and don't save any data.

OR

If the start date that has just been entered is <= to the start of any booking for this property, and the end date is <= to the end of any booking for this property, and the end date that has just been entered is > start date of any booking for this property, then display a message box "property double booked" and don't save any data.

OR

If the start date that has just been entered is >= to the start of any booking for this property, and the end date is >= to the end of any booking for this property, and the end date that has just been entered is < start date of any booking for this property, then display a message box "property double booked" and don't save any data.

OR

If the end date that has just been entered <= start of any booking for this property and the start date that has just been entered >= end of any booking for this property then display message box "booking successfull" and save data in tblRentals

WOW!!!! Lot of info there guys any help would be much appreciated. Fields in tblRentals are PropertyID, DateStart, DateEnd, and CustomerID. I am so confused about all of this!!!!!!!

Chris Smith
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
booking system newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 July 19th, 2007 04:17 PM
Appointment Booking System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 July 18th, 2007 08:32 AM
Casting System::Object __gc * to System.Double[] nepsat Visual C++ 3 November 19th, 2005 11:51 AM
booking system: first time using dates whyulil Classic ASP Basics 1 October 13th, 2004 09:03 PM
Celendar Booking System acdsky Classic ASP Basics 0 March 31st, 2004 01:42 AM



All times are GMT -4. The time now is 02:27 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.