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.
Can I join the same table twice to join to different fields
ex:
Table A NAME | DATE1 |
Table B NAME | DATE2
Table C DATE
Can I do a join like,
JOIN NAME IN TABLE A TO UNIQUE NAME IN TABLE B AS J0 END JOIN DATE1 IN TABLE A TO UNIQUE DATE IN TABLE C AS J1 END JOIN DATE2 IN TABLE A TO UNIQUE DATE IN TABLE C AS J2 END
Thanks,This message has been edited. Last edited by: Kerry,
In Focus since 2008 WebFOCUS 8.2.0.1 Windows 7 - IE,Chrome,Firefox Excel, PDF, HTML, AHTML, XML JavaScript, jQuery, D3.js, Highcharts
Posts: 79 | Location: New York | Registered: February 04, 2010
Yes, but you will have to reference the columns in Table C with a prefix.
e.g. JOIN NAME IN TABLE A TO UNIQUE NAME IN TABLE B AS J0 JOIN DATE1 IN TABLE A TO UNIQUE DATE IN TABLE C TAG T1 AS J1 JOIN DATE2 IN TABLE A TO UNIQUE DATE IN TABLE C TAG T2 AS J2
Recursive Join possible only for FOCUS or IMS data source. Either specify a unique Join Name or Use Tag names.
Here is a sample code
DEFINE FILE CAR
COUNTRY_N/A16=COUNTRY;
CAR_N/A16=IF CAR EQ 'AUDI' OR 'JENSEN' THEN 'ENGLAND' ELSE CAR;
END
TABLE FILE CAR
SUM
RETAIL_COST
BY COUNTRY_N
BY CAR_N
ON TABLE HOLD AS HLD_1 FORMAT FOCUS
END
DEFINE FILE CAR
COUNTRY_N/A16=COUNTRY;
END
TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY_N
BY CAR
ON TABLE HOLD AS HLD_2 FORMAT FOCUS INDEX COUNTRY_N
END
JOIN COUNTRY_N IN HLD_1 TO COUNTRY_N IN HLD_2 AS J1
JOIN CAR_N IN HLD_1 TO COUNTRY_N IN HLD_2 AS J2
-RUN
?FF HLD_1
TABLE FILE HLD_1
PRINT *
END
Recursive Join possible only for FOCUS or IMS data source.
Not True.
I do recursive joins with Oracle all the time. For example:
JOIN CL_CLSSN IN KDSCLINT TAG A TO CL_CLSSN IN KDSCLINT TAG B
TABLEF FILE KDSCLINT
PRINT B.CL_CLID
BY A.CL_CLID
WHERE A.CL_CLID NE B.CL_CLID
ON TABLE HOLD
END
generates this SQL
SELECT T1."CL_ID",
T1."CL_SSN_NBR",
T2."CL_ID"
FROM KIDSPROD.TCLIENT T1,
KIDSPROD.TCLIENT T2
WHERE (T2."CL_SSN_NBR" = T1."CL_SSN_NBR")
AND (T1."CL_ID" <> T2."CL_ID")
ORDER BY T1."CL_ID";
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
... and from the opposite side of the world, how close was that!
I reckon that it was milliseconds myself because your post came up during the auto refresh upon submission, so we must have hit the button almost simultaneously.
Just goes to show ..... something, not sure what, but it definitely shows something
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Well, I am getting jealous now since I still have a looooooong way to go.
I may not have too much to celebrate by having been recently "promoted" from Gold Member to Platinum Member except perhaps for the fact that I no longer have the weird sensation of being an Austin Powers character
Good one to Warren ... and Francis, you're almost there!
If I dare get back on topic, consider making two passes at that table, both for the sanity of you and your future maintenance coders, and to establish better control on any multiplicative effects that could occur. Were it me I would take one pass at it for the first join, prefix every field while doing it, and then use the resulting hold file with a single join a second time.
You CAN do it with the double join, just be careful. It would be oh-so-easy to have the wrong field in a where clause.
J.This message has been edited. Last edited by: John_Edwards,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007