Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] adding more records to the table
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] adding more records to the table
 Login/Join
 
Master
posted
Hi,

I have to display 5 regions with 10 different codes. That means always I have to display 50 rows of data.

Ex:
Table 1:
1 BMW MODEL1
2 JAGUAR MODEL2
2 TOYOTA MODEL3
3 BMW MODEL1
3 TOYOTA MODEL3

I want the output to be

1 BMW MODEL1
1 JAGUAR MODEL2
1 TOYOTA MODEL3
2 BMW MODEL1
2 JAGUAR MODEL2
2 TOYOTA MODEL3
3 BMW MODEL1
3 JAGUAR MODEL2
3 TOYOTA MODEL3

How can I do this? Thanks for your help.

This message has been edited. Last edited by: <Kathryn Henning>,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Look up:

RANKED BY
IN GROUPS OF


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
You're looking for all distinct combinations? Try this:

 TABLE FILE ibisamp/ggsales
 PRINT DST.REGION
 ON TABLE HOLD AS ggregion
 END

 TABLE FILE ibisamp/ggsales
 PRINT DST.PCD 
 ON TABLE HOLD AS ggpcd
 END

 SQL 
 select REGION, PCD
 from ggregion, ggpcd 
 ;
 TABLE ON TABLE HOLD AS cartesian
 END 
  
 TABLE FILE cartesian
 PRINT *
 END


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 147 | Registered: October 19, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
sweet way to create a Cartesian product,db! beats manual McGyver-ing




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Master
posted Hide Post
Good One


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 669 | Location: Veghel, The Netherlands | Registered: February 16, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
PRINT with DST? does this work?
I would think that you get all the rows and not all the values.
Using your idea with FOCUS code:
  
-* File dbeagan01.fex
TABLE FILE ibisamp/ggsales
 SUM 
 COMPUTE ONE/I1=1;
 BY REGION
 ON TABLE HOLD AS ggregion FORMAT FOCUS INDEX ONE
 END

 TABLE FILE ibisamp/ggsales
 SUM 
 COMPUTE ONE/I1=1;
 BY PCD 
 ON TABLE HOLD AS ggpcd FORMAT FOCUS INDEX ONE
 END

 JOIN ONE IN GGREGION TO ALL ONE IN GGPCD AS C
 TABLE FILE GGREGION
 PRINT REGION PCD
 END



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

 
Posts: 1941 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Danny-SRL,

I like it. Might be preferred as a more pure FOCUS approach.


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 147 | Registered: October 19, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] adding more records to the table

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.