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
WebFOCUS 8.2.06
December 12, 2014, 10:44 AM
susannah
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
December 15, 2014, 05:16 AM
Dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
December 15, 2014, 12:00 PM
Danny-SRL
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
December 16, 2014, 08:23 AM
dbeagan
Danny-SRL,
I like it. Might be preferred as a more pure FOCUS approach.