By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Counting the number of times a number turns up

P: n/a
I have 4 fields (byte) which can each contain a number between 1 and 40
odd..
The numbers in each of the fields represents the same information that can
occur in one of 4 places.

In each set of 4 (which would represent 1 record), each number can only
occur in 1 of the 4 fields, it cannot be in the one record twice.

I need a report that can tell me how many times each number occurs overall
(in either field 1, 2, 3 or 4.

I cannot come up with anything that seems to work for me.

Help
May 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Dixie wrote:
I have 4 fields (byte) which can each contain a number between 1 and 40
odd..
The numbers in each of the fields represents the same information that can
occur in one of 4 places.

In each set of 4 (which would represent 1 record), each number can only
occur in 1 of the 4 fields, it cannot be in the one record twice.

I need a report that can tell me how many times each number occurs overall
(in either field 1, 2, 3 or 4.

I cannot come up with anything that seems to work for me.

Help


Dixie,
any reason you can't union the records together and then summarize the
results with a totals query?

Something along the lines of

SELECT FieldA AS CountMe
FROM tblA
WHERE FieldA IS NOT NULL
UNION ALL
SELECT FieldB AS CountMe
FROM tblA
WHERE FieldB IS NOT NULL
.....

Then you could just base a totals query on that query. Or you could
base your report on that...

HTH

May 29 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.