Count even numbered records

Ron_dK

Cool bop aficionado
Local time
Today, 01:33
Joined
Sep 5, 2002
Messages
2,141
I have a table with quite a number of records.
In this table I have a field [Qnumber], which gives me a sequential number.
The field size is Long Integer. So my records are numbered 1, 2, 3, ....n
What I want to achieve is to select only the even numbered records in this table, i.e. Qnumber = 2, 4, 6, ...... etc.
I can't find a way to do this.
Would appreciate any help on this.
 
your WHERE statement needs to look like this:

WHERE [Qnumber] Mod 2=0


If you want the odd numbers then:

WHERE [Qnumber] Mod 2=1


hth
Chris
 
Look at "DemoModA2000.mdb"
look at Table1, Query1 (column 4).
 

Attachments

The SQL :

SELECT Table1.QNumber,
FROM Table1
WHERE ((([Qnumber] Mod 2)=0));

works fine.

Thanks guys.
 

Users who are viewing this thread

Back
Top Bottom