查询以查找可用房间 [英] Query to find available rooms

查看:61
本文介绍了查询以查找可用房间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再次感谢我对上一个问题的快速和出色的回复。


我现在差不多完成了我的迷你项目,并且一直打印出打印出一系列房间的方式目前没有预订。


我有一张桌子

tblbooking其中包含预订ID(自动编号),cutomer ID和RoomID(来自tblroom表)

和tblroom有RoomID roomPrice和房间类型


我想做的是运行一个查询,将搜索当前的预订和打印所有未预订的房间列表?我尝试了一些东西,但它似乎没有用。


任何idaes


谢谢


Mark

thanks again for the quick and excellent response to my last question.

Im nearly finished my mini project now and have got stuck on a way to print out a list of rooms that are not currently being booked.

I have a table
tblbooking which has in it a booking id (Auto number), cutomer ID and RoomID (from the tblroom table)
And tblroom which has RoomID roomPrice and Room Type

and what i want to do is run a query that will search though the current bookings and print a list of all rooms not currenlty booked? Ive tried a few things but it doesnt seem to work.

Any idaes

thanks

Mark

推荐答案

什么决定当前没有预订?
What determines that thay are not currently booked?


MetaData表可能对此有所帮助。

请将其发布在代码标签中以保持布局清洁。
The table MetaData would probably help here.
Please post it in Code tags to keep the layout clean.
展开 | 选择 | Wrap | 行号



再次感谢我对上一个问题的快速而出色的回应。

我现在几乎完成了我的迷你项目,并且一直打印出一份目前没有预订的房间列表。


我有一个表

tblbooking其中包含预订ID(自动编号),cutomer ID和RoomID(来自tblroom表)

和tblroom,其中有RoomID roomPrice和Room Type


和我想要做的是运行一个查询,它将搜索当前的预订并打印所有未预订的房间列表?我尝试了一些东西,但它似乎没有用。


任何idaes


谢谢


Mark
thanks again for the quick and excellent response to my last question.

Im nearly finished my mini project now and have got stuck on a way to print out a list of rooms that are not currently being booked.

I have a table
tblbooking which has in it a booking id (Auto number), cutomer ID and RoomID (from the tblroom table)
And tblroom which has RoomID roomPrice and Room Type

and what i want to do is run a query that will search though the current bookings and print a list of all rooms not currenlty booked? Ive tried a few things but it doesnt seem to work.

Any idaes

thanks

Mark



''我假设

''tblRoom和tblBooking之间存在1到MANY的关系在[RoomID]上:

''tblRoom。[RoomID](1)===> tblBooking。[RoomID](M)。如果这个假设是

''正确那么你需要的是一个不匹配的查询,它只会给你

''tblRoom中没有匹配条目的所有房间tblBooking

''在我的脑海里转化为没有当前预订的房间。这是

''程序:


1)查询,新的,无与伦比的查询向导

2)首先提示 - tblRoom

3)第二次提示 - tblBooking

4)选择[RoomID]作为两个表中的匹配字段

5)选择所有字段输出结果,即[RoomID],[RoomPrice]和

[房间类型]

6)命名查询,例如qryRoomWithNoBookings


注意:我希望我能正确解释你的请求,如果不是我的合法化。

''I''m making the assumption that there is a 1 to MANY Relationship between
''tblRoom and tblBooking based on [RoomID] namely:
''tblRoom.[RoomID](1) ===> tblBooking.[RoomID](M). If this assumption is
''correct then what you need is an Unmatched Query which will simply give you
''all the Rooms in tblRoom which do not have matching entries in tblBooking
''which in my mind translates to Rooms with no current Bookings. Here is the
''Procedure:

1) Query, New, Unmatched Query Wizard
2) First prompt - tblRoom
3) Second prompt - tblBooking
4) Select [RoomID] as the matching Field in both Tables
5) Select all Fields in the output results, namely [RoomID], [RoomPrice], and
[Room Type]
6) Name the Query e.g. qryRoomWithNoBookings

NOTE: I hope I interpreted your request properly, if not I apoligize.


这篇关于查询以查找可用房间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆