Substitute missing values from a series

SunWuKung

Registered User.
Local time
Today, 06:54
Joined
Jun 21, 2001
Messages
172
I have a table which contains 3 columns.
For each CompID CutPointValue goes from 1 to 10 and I have a count for it, like this:

CompID, CutPointValue, CountCutPointValue
1,1,20
1,2,30
1,3,14
..
1,10,14
2,2,15
2,3,10
...

The problem is that in a few cases a few CutPointValue numbers may be missing from the series. I would like to have them in with a 0 value.
Like in the example before CutPointValue 1 is missing for CompID 2. Still I would like to get the record 2,1,0 listed.
How can I create such a query?

Thanks for the help.
SWK
 
I have attached a sample database.

I put the CompID and CutPointValue lists in two tables, and created a series of two queries. In the second query, I used Left Join and Nz() to return the zeroes.
 

Attachments

Jon,
I've got the ide and have it working now.

Thanks for your help.
SWK
 

Users who are viewing this thread

Back
Top Bottom