Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Storing Dates
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Storing Dates

 Post Reply Post Reply
Author
hockenpj View Drop Down
Groupie
Groupie
Avatar

Joined: 10 February 2003
Location: Belgium
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote hockenpj Quote  Post ReplyReply Direct Link To This Post Topic: Storing Dates
    Posted: 15 September 2003 at 12:26pm

I am in the process of developing a database that will allow me to keep track of my assets (sound equipment).

What I want to be able to do is to be able to see if my equipment is in my warehouse of if it is out on a job.  If it is out on a job then it will be allocated to a customer.

I have more or less figured out how I am going to build it, but I have one problem.  I cannot figure out how I am going to tackle advanced bookings.  For example if I want to book a amplifier for next Monday, then I try to book that same amplifier for next Monday - the database needs to tell me that it has already been allocated.

How can I do this so that I can allocate equipment years in advance?

Please give me your ideas.

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2003 at 3:40pm

TableEquipment
EquipmentID
EquipmentType  (e.g. Basedrum, Guitar, Speaker Type 1 etc.)
EquipmentName

TableBookings
BookID
EquipmentID
BookDate


Now if you make a request for let's say Equipmenttype = 'Basedrum' for the date of 09/25/03 you would like you said have to see if it is not already booked, you can do that with a simple query like:
Select * from TableEquipment e JOIN TableBookings b ON e.EquipmentID = b.EquipmentID WHERE NOT b.BookDate = '09/25/03'

This would return all Basedrums that are not booked on that day.
Now you can get keen with all that and I am assuming a lot here as I don't even know if they are in categories.
If you just have a list of equipment that you click and select a date you want to book it, then want to get a warning that the piece is not available for said date you would do pretty much the same ...
Select * from tableequipment e join tablebookings b ON e.equipmentid = b.equipmentid where not b.bookdate = @yoursearchvariablehere

If the bookins have a timespan you just put a between into the query so it searches a timeframe.   

Back to Top
hockenpj View Drop Down
Groupie
Groupie
Avatar

Joined: 10 February 2003
Location: Belgium
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote hockenpj Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2003 at 6:20am
Thanks for your help and prompt reply.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.