Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL / GROUP BY (Join)
Message
De
26/09/2003 14:48:18
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00832747
Message ID:
00832794
Vues:
12
Sergey:

I have another issue:

I would like to SUMmarize the weight of all rolls (a product) according to the machine it was produced on using a SQL statement, however the tricky part is that I would like to have the resultant counters (11 of them) in a cursor as fields across the table.

I need it set up this way to facilitate in a report layout which must have the machine displayed accross.

For example.

SUM nAccepted for Line "101" is 100 lbs
SUM nAccepted for Line "102" is 500 lbs
.
.
.
SUM(nAccepted) for Line "111" is 250 lbs

I would like my result file to be setup as follow.

Field: Value:
====== =========
nAccepted_101 100
nAccepted_102 500
.
.
.
nAccepted_111 250

Is it possible with a SQL statement?

All weights come from the same table ROLLS, and have the line number/code as part of the record.

John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform