Hi
I have some qusetion in AS400
How can we convert rows into columns and columns into row for a PF in AS400.
Please send me the coding for this requirement.
Thanks
Software/Hardware used:
AS400
ASKED:
January 21, 2011 11:01 AM
UPDATED:
January 22, 2011 1:17 AM
What is your OS version and release?
In current releases of the OS, this would usually be done with recursive SQL.
You show initially three rows with five columns. Will there ever be a different number of rows or columns? The generation of a new column when an additional row is added to the table would be a problem, though not insurmountable. The logic just gets complex.
Tom
Also (in V6R1 and later), you might choose to use OLAP specifications to create a CUBE ‘super-aggregate’ set of rows. That might help simplify coding.
Tom