count-view numbers

S

swab

In a database i have a table with 15 columns end about 400 rows, the first
is date and other are numbers .
I desire found and count the only rows that have numbers of "first group"
(first seven columns after data) equal to "second group" (second seven
columns).
I must compare each cell of a row (first seven columns ) with each cell of
(second seven columns) and found and view max number of equal value.
 
T

Tom Ellison

Dear Swab:

I'll use N1A to mean "numberic value 1 from set A". And, I'll shorten the
problem to comparing 3 column pairs. I think you'll be able to extend it to
7 pairs without much problem.

In the Query Design Grid:

Matches: IIf(N1A = N1B, 1, 0) + IIf(N2A = N2B, 1, 0) + IIf(N3A = N3B, 1,
0)

If I understood your need, you want to count how many pairs match. This
should do it. Sorry if this isn't what you are wanting. That's what I
understood from "max number of equal value."
 

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