Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL / GROUP BY (Join)
Message
From
26/09/2003 14:48:18
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00832747
Message ID:
00832794
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform