Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Access dilema

Author  Topic 

php95saj
Starting Member

43 Posts

Posted - 2003-03-22 : 15:24:04
Guys I have four tables in an access database
1 tblRoomType
roomTypeID (PIK)
roomTypeDesc (text)

2 tblRoomSize
roomSizeID (PIK)
roomSizeDesc (text)

3 tblHolidayPeriod
holidayPeriodID (PIK)
startDate (date/time)
endDate (date/time)
holidayPeriodDesc (text)

4 tblRates
rateID (PIK)
roomTypeID (number)
roomSizeID (number)
holidayPeriodID (number)
rate (currency)

I have a form in which user can select room size, start and and end date and I have to give the user prices for three different types of room for that room size for that period. I cann't get this into my head. Can anyone help?
TIA


Sharjeel

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2003-03-24 : 02:04:39
Please post forums related to Access in MSAccess category.
Try this :
SELECT tblRoomType.roomTypeDesc, tblRates.rate
FROM tblHolidayPeriod INNER JOIN ((tblRoomSize INNER JOIN tblRates ON tblRoomSize.roomSizeID = tblRates.roomSizeID) INNER JOIN tblRoomType ON tblRates.roomTypeID = tblRoomType.roomTypeID) ON tblHolidayPeriod.holidayPeriodID = tblRates.holidayPeriodID
WHERE (((tblRoomSize.roomSizeDesc)='size') AND ((tblHolidayPeriod.startDate)='01/01/2003') AND ((tblHolidayPeriod.holidayPeriodDesc)='03/03/2003'));

Sekar
~~~~
Success is not a destination that you ever reach. Success is the quality of your journey.
Go to Top of Page
   

- Advertisement -