This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > February 2006 > ASP and Access SQL query help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ASP and Access SQL query help
Neil

2006-02-07, 10:40 pm

Hello

I am using DW8/ASP/Access

I would appreciate if someone could help me with this query.

I have a table called 'booking' which contains the following fields:

bookID (autonumber)
startdate (date)
room (text)
numweeks (number)
minsession (number 1..9)
maxsession (number 1..9)
staff (text)

It is used to store details of room bookings. There is a startdate for a
booking, how many weeks it is for, and which sessions of the days it covers
(minsession to maxsession).

What I would like to do is to find out if a particular room is free for a
SINGLE date and for a SINGLE session (1..9) but I am having trouble
constructing a suitable SQL query.

Obviously the query will need to decide if the given date is inbetween
startdate and multiples of 7 days upto numweeks and if the given session is
between minsession and maxsession.

I really don't know how to do this, and would appreciate any help.

Many thanks
Neil


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews