Charles and Rob:
Never did figure out how Pivot table in Excel work.  I always endup get mad and 
go back to use good old SQL.  

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of rob@xxxxxxxxx
Sent: Thursday, January 13, 2005 12:27 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: SQL grouping


I tried doing this with SQL via a "pivot" table and gave up.  Again, it's 
because the value of the feature does not stay constant in a particular 
column.  I assume that you have more than 8 possible features, but no 
customer will have more than one.  (Much like no one gets all 7 sacraments 
in the Catholic Church - Priesthood vs Marriage thing.  And even there - 
there have been exceptions.)  Because if that wasn't the case, and you did 
NOT have more than 8 possible features than a pivot table would work. 
Feat1 could only be ABC, etc.

Workarounds.
1 - Normalize your database.  The excel one is actually laid out better. 
Fancy that.
2 - Use RPG or some such language using control break reporting to do it 
instead.



This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.