Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Converting rows to columns

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Converting rows to columns
 Login/Join
 
Platinum Member
posted
HI ,
I have searched thru the columns and found columns to rows conversion , but not the other way.
I have a table that has following value

id rank number
1 A 1001
1 B 1002
1 C 1003
2 A 1004
2 B 1005

I need to convert it to

id rank 'A' rank 'B'
1 1001 1004
2 1002 1005


Does anyone have any suggestions. I tried using define but could not eliminate extra rows that come with for example rank C.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Expert
posted Hide Post
Wouldn't

TABLE FILE ...
SUM NUMBER
BY ID
ACROSS RANK
END

do the job?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
NO,
I need to be able to identify the across column.
its part of a bigger problem.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Platinum Member
posted Hide Post
Here is my code
JOIN LIKP_VBELN IN LIKP TO MULTIPLE LIPS_VBELN IN LIPS AS J0
JOIN LIPS_VBELN IN LIKP TO VBUK_VBELN IN VBUK AS J1
JOIN LIPS_VGBEL IN LIKP TO VBAK_VBELN IN VBAK AS J2
JOIN VBAK_VBELN IN LIKP TO MULTIPLE VBPA_VBELN IN VBPA AS J3

DEFINE FILE LIKP
SHIPTO/A100 = IF VBPA_PARVW EQ 'WE' THEN VBPA_KUNNR ELSE '';
CARRIER/A100 = IF VBPA_PARVW EQ 'TU' THEN VBPA_LIFNR ELSE '';
END
TABLE FILE LIKP
PRINT
SHIPTO
CARRIER
BY VBPA_VBELN
WHERE VBUK_WBSTK = 'C'
AND VBPA_VBELN = '0000000051'
AND LIKP_WADAT FROM '20050101' TO '20070501'
END

and my output looks like

SD Doc. SHIPTO CARRIER
51......................
..........................
..........................
..........................700001
..........1000007



but I need

SD Doc. SHIPTO CARRIER
51 1000007 700001


The blank spaces occur because VBPA_PARVW has other values. If I do a sum instead of print, I am getting blanks.

SD Doc. SHIPTO CARRIER
51


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Platinum Member
posted Hide Post
Would

 
SUM
MAX.SHIPTO
MAX.CARRIER
BY VBPA_VBELN  


work to remove your blank spaces?

Kevin


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Expert
posted Hide Post
How do you know that SHIPTO 1000007 and CARRIER 700001 belong to SD Doc. 51?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Ok, Max. did it.,that was easy. thanks Kevin.
Thanks Francis too for enquiring into this.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Converting rows to columns

Copyright © 1996-2020 Information Builders