[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] Rows as columns using SQR



Hi folks,
 
I am completely new to SQR. 
 
I want to put rows of an SQL output as column headings.
 
e.g.
 
i'm getting data in SQL like 
 
code   qtrnum     fiscalyr            sum(qty)
------------------------------------------------------------
10      2             2003                  100
10      3             2003                  200
10      4             2003                  240
10      1             2004                  250
10      2             2004                  200
20      2             2003                  140
20      3             2003                  100
20      4             2003                  200
20      1             2004                  340
20      2             2004                  300
 
here, code & sum(qty) are coming from prod table and qtr and yr are coming from 
fiscal cal table
 
i want to display this result using SQR in following way
 
 
code       Q22003       Q32003     Q42003      Q12004      Q2004
---------------------------------------------------------------------------------------------
10           100              200          240             250            200
20           140              100          200             340            300   
        
 
Please suggest how to do it.
 
Thanks in advance....
 
Darshil


---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users