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

Re: [sqr-users] Transposing rows to columns



If I am reading your statement "if any one of the above first 2 column values 
(Seq No or Pay End Dt)
changes then I want to write it as a row else append to the same row"

Seq No Pay End Date Plan Type-10 Amount Plan Type-11 Amount

1    Jan        10             $20               $0
1          Feb                    10                 $15               $20


Right????

But I any way ... You can do this by building/concating  string $variable 
before writing to the file.

Also you can use on-break on the sql statement.

HTH... 



----- Original Message ----
From: "Vaidyanathan, Ramakrishnan (GE, Corporate, consultant)" 
<ramakrishnan.vaidyanathan@ge.com>
To: sqr-users@sqrug.org
Sent: Thursday, March 8, 2007 3:04:32 PM
Subject: [sqr-users] Transposing rows to columns

Hi All,

    Can anyone help me with the logic on how to display the row values as 
columns from a table. For eg. the table contains the data in the below format

Seq No    Pay End Dt Plan Type Amount
1              Jan           10             $20
1              Jan           10             $0
1              Feb           10            $15
1              Feb           11            $20

If any one of the above first 2 column values (Seq No or Pay End Dt) changes 
then I want to write it as a row else append to the same row. I want the output 
to be written to a file in the following format

Seq No Pay End Date Plan Type-10 Amount Plan Type-11 Amount

1    Jan        10             $20
1          Jan                    10                 $0
1          Feb                    10                 $15               $20

please help me with the logic to do this.

Thanks
Ram

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







 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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