Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Available, Used, Remaining" paradox (query)

Status
Not open for further replies.

Soldier8968

Technical User
Oct 25, 2001
1
US
I have a database that tracks vacation time. One query calculates amount of V time available and another calculates amount that has been used. The Available query includes every date of the year. The Used query only shows the dates when V time was used. Here's the problem:

AvailQuery: UsedQuery:
Date Available Date Used
1/1/02 5 1/1/02 3
1/2/02 6 1/5/02 1
1/3/02 4
1/4/02 5
1/5/02 4

(This is what I end up with)
FinalQuery:
Date Available Used Remaining
1/1/02 5 3 2
1/5/02 4 1 3

(This is what I want to end up with)
FinalQuery:
Date Available Used Remaining
1/1/02 5 3 2
1/2/02 6 0 6
1/3/02 4 0 4
1/4/02 5 0 5
1/5/02 4 1 3

I have tried the different types of joins and also using IsNull in my queries, but to no avail. Can anyone solve this one for me?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top