Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement