I think what you're looking for is COUNT():
SELECT part_number, COUNT(*) AS NbrItems FROM Table GROUP BY part_number
So, assuming your table looks like this:
Part_number0001
0001
0002
0002
0002
0002
0003
0003
0003
The result would be:
<b>Part_number NbrItems</b>
0001 2
0002 4
0003 3
>In vfp60, Is there a way to SUM alike records with a SELECT statement?
>I have a table with a field called part_number. This table is ORDER BY part_number...There are many records that contain the same
>part_number values and I want to SUM these records so I have
>a DISTINCT on part_number and the part_number values will be totaled and represented in one record for each part_number...any ideas?
Sylvain Demers