Problem.... Problem..... Please Help

S

Sai Krishna

Hello everybody!

I am explaining my problem with the following example.

ID No of Beds Booked From To
(mm-dd-yyyy) (mm-dd-yyyy)

1 30 4-1-2003 4-1-2003
2 20 4-3-2003 4-5-2003
3 5 4-4-2003 4-4-2003

Now total beds are say 100.

From the above data
(i) 30 beds are booked on 4-1-2003 means 70 beds are
remaining in hand.
(ii) 20 beds are booked on 4-3-2003 and 4-5-2003 means
80 beds are remaining in hand
(ii) 20+5 beds are booked on 4-4-2003 means 75 beds are
remaining in hand.

I want to see the status of beds available from 4-3-2003
to 4-10-2003. My query or report should ask the above
range of two dates i.e., 4-3-2003 and 4-10-2003 as
parameters, then it should display the status like below:

Date Beds Booked Beds Available
4-3-2003 20 80
4-4-2003 25 75
4-5-2003 20 80
4-6-2003 0 100
4-7-2003 0 100
4-8-2003 0 100
4-9-2003 0 100
4-10-2003 0 100

Note: (i) on 4-4-2003 total beds booked is 25 (i.e., 20
from ID2 + 5 from ID2)
(ii) from 4-6-2003 to 4-10-2003 there is no records
in the table but still i want my report should display
status as all the beds available in the days like above.

My actual proble is mentioned in note (ii). I am very much
thankful if anybody help me in solving the above problem.


Sai Krishna
 

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