[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
- Subject: Re: [sqr-users] Transposing rows to columns
- From: Arun Kumar <arunkumar13@yahoo.com>
- Date: Thu, 8 Mar 2007 12:53:51 -0800 (PST)
- Delivery-date: Thu, 08 Mar 2007 15:56:22 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID;b=EoeITIVKsexJbLr7XBYBCTpeG9BI2RHV/ZWyEi4AbqFyi0G37VeTG+sVU5P9A3OTfpj9qO6+Eqmkj4yXwxp7xUFdEtHxhtz8GZTvlO9iLd6I89zORYkDRoHU4CHMwi+OSL0zKLBb5UT4uTX30wL9X+mwG1hoB7OTLVLH/K3vJYE=;
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
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