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     [SOLVED] BY Output in one line

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] BY Output in one line
 Login/Join
 
Platinum Member
posted
Hi Focals i need a logic to build this:

COUNTRY DISTINCT BODYTYPE
ENGLAND CONVERTIBLE, HARDTOP, SEDAN
FRANCE SEDAN
ITALY COUPE, ROADSTER, SEDAN
JAPAN SEDAN
W GERMANY SEDAN

With my code:
TABLE FILE CAR
PRINT   
 DST.BODYTYPE
BY  COUNTRY
END


I got this:

COUNTRY DISTINCT BODYTYPE
ENGLAND CONVERTIBLE
HARDTOP
SEDAN
FRANCE SEDAN
ITALY COUPE
ROADSTER
SEDAN
JAPAN SEDAN
W GERMANY SEDAN

Thanks to all!!!

Christian

This message has been edited. Last edited by: ChristianP,


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
Virtuoso
posted Hide Post
Hi Christian,

Try this:
  
TABLE FILE CAR
BY COUNTRY
RANKED BY BODYTYPE
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD
END
TABLE FILE HOLD
SUM BODYTYPE AS ''
BY COUNTRY AS ''
ACROSS RANK NOPRINT
HEADING
"COUNTRY<+0>DISTINCT BODYTYPES"
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=INTERNAL, $
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
Or, to get a comma-delimited list (and ensure it's alphabetised):

  
TABLE FILE CAR
COUNT ENTRIES
BY COUNTRY
BY BODYTYPE
ON TABLE HOLD
END
DEFINE FILE HOLD
BODYTYPE_LIST/A500V= 
IF (COUNTRY EQ LAST COUNTRY)
 THEN  BODYTYPE_LIST || (', ' | BODYTYPE)
 ELSE  BODYTYPE ;
END
TABLE FILE HOLD
WRITE LST.BODYTYPE_LIST AS BODYTYPES
BY COUNTRY
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
Or, if you want to use without hold file try below code
 TABLE FILE CAR
SUM
COMPUTE COL1/A500V = IF COUNTRY EQ LAST COUNTRY THEN LAST COL1 || (', ' | BODYTYPE) ELSE BODYTYPE;
COMPUTE CNTR/I11 = IF COUNTRY EQ LAST COUNTRY THEN LAST CNTR + 1 ELSE 1; NOPRINT
BY COUNTRY
BY TOTAL HIGHEST 1 CNTR NOPRINT
BY BODYTYPE NOPRINT
END
-EXIT 


By,
Kumaravel.M
 
Posts: 13 | Registered: September 29, 2008Report 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     [SOLVED] BY Output in one line

Copyright © 1996-2020 Information Builders