Setting Up A Query with Certain Date Criteria

A

Ange Kappas

Hi,
I was wondering if anyone can help me with adjusting a query with
the following criteria.

I have a query which filters out all charges made clients per day.

The fields in the query TODAY CHARGES are:

DATE
NAME
ROOMNO
ARRIVAL
DEPARTURE
COMPANY
TYPECHARGE
CHARGE

For example the data which are filtered out are:



DATE 1-5-08
NAME Jones
ROOMNO 101
ARRIVAL 1-5-08
DEPARTURE 8-5-08
COMPANY TCT
TYPECHARGE Person
CHARGE 10

The charge is set from the first day the client arrives at the hotel, but
there is a table which has a range of dates which the charges changes.

This table called PRICELIST has the fields

COMPANY
CHARGE
START
END
PRICE

The data in the PRICELIST table could be as:

COMPANY TCT TCT
CHARGE 10 12
START 1-5-08 6-5-08
END 5-5-08 16-5-08

As you can see the price changes on the 6-5-08 hence I want the query to
include the field CHARGE from the PRICELIST table and when the DATE on the
query TODAY CHARGES shows 6-5-08 to look at the table PRICELIST and to have
the price 12.

Thanks
Ange
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top