Subject Re: [ib-support] Re: Sql Query
Author Shimon Salzman
Darin,

A stored proc would do fine. And the room must be available during the
complete time span. A room is available as of the departure date in the
Check Out table or Reservation table. Guest will leave in the am and arrive
in the PM.

John


>From: dv@...
>Reply-To: ib-support@yahoogroups.com
>To: ib-support@yahoogroups.com
>Subject: [ib-support] Re: Sql Query
>Date: Thu, 02 Aug 2001 01:54:15 -0000
>
>I can't see it being done with just a query but I could with a stored
>procedure with a couple of queries. Would you being using a stored
>procedure?
>
>There are questions to answer like what if they arrive 8/1 and leave
>8/3 will that room be considered available since it does become
>available between the dates in the example or does the room have to
>be empty during the whole time span?
>
>- Darin Vanatta
>
>--- In ib-support@y..., "Shimon Salzman" <shimon_salzman@h...> wrote:
> > Hello All,
> >
> > I am John Salzman and new to your group. I am 48 and working in the
>field
> > for about 25 years mostly as a contractor.
> >
> > I must be too tired and in need of a vacation as I am having
>difficulty
> > creating what should be a rather simple query, perhaps someone may
>have
> > sometime to help figure this out?
> >
> > I have 3 tables as follows:
> >
> > Room Table Reservation Table Check In Table
> >
> > Fields:
> >
> > Room_ID Guest_ID Guest_ID
> > Room_Type Arrival_Date Check_In_Date
> > Departure_Date Departure_Date
> > Room_Type Room_Type
> > Room_ID
> >
> > I need to build a query that will tell me how many rooms are
>available of a
> > particular room type for a given range of dates (arrival thru
>departure) ie:
> >
> > How many rooms of type "SKJ" are available from
> > 8/1/2001 to 8/5/2001.
> >
> > The Room table provides the information for the number of total
>rooms of a
> > particular type. I can program this through vb, delphi, etc.,
>however, I
> > think I do this through sql. Any help is appreciated.
> >
> > thank you,
> > John Salzman
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp