Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to SUM alike records with a SELECT statem
Message
De
13/10/2000 12:33:40
 
 
À
13/10/2000 12:19:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00429156
Message ID:
00429169
Vues:
14
Assuming that you want to sum a field such as Quantity, you could use something like this.
SELECT MyTable.Part_Number, sum(MyTable.Qty) as Qty ;
 FROM MyTable ;
 GROUP BY MyTable.Part_Number ;
 ORDER BY MyTable.Part_Number
The Group by will create one record for each part number.

>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?
____________________________________________

Norm Peterson

It's a dog eat dog world out there,
and I'm wear'n milk bone underware!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform