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.
You can do this. Lets trick it. You can join on the 2 real fields and create your define field then add your own where statement for the other join. You can turn on SQL tracing and turn off retrieval execution to see the SQL by adding the below 3 line to the top of your focexec. NOTE: this trick only works for a SQL RDBMS and may not work for cross database joins.
SET TRACEON=STMTRACE//CLIENT SET TRACEUSER=ON SET XRETRIEVAL=OFF
I assume use of WITH with a compound key is supported.
The WITH phrase doesn't really modify a particular key element -- it modifies the JOIN as a whole. "WITH wfld" specifies that the overall key for the join changes whenever a new instance of the segment containing wfld is read.
Thus the WITH phrase belongs after the list of key fields, and the WITH fieldname should be a field in the lowest segment that contributes to the overall key.
For example, if the first element of a two-piece key is a defined field based entirely on the root segment, but the second element of the compound key is in a lower segment, JOIN fld1 AND fld2 WITH fld2 would be correct; WITH <some-field-in-the-root-segment> would yield incorrect results.
In your case, use: JOIN DEFFIELD1 AND FIELD2 WITH FIELD1 IN TABLE1 TO FIELD1 AND FIELD2 IN TABLE2 AS J1 END
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Originally posted by Pietro De Santis: [qb] . . . I need to join a P5 field and a A25 field to a A10 field and a A25 field in two Oracle tables. [/qb]
I assume the P5 is USAGE= P10, ACTUAL=P5.
Let's decompose the problem. There is a series of three challanges here:
1. For just the P5 to A10 equality test, can you express a single-key join as a SQL SELECT. It will depend on the functions supported by your RDBS for WHERE equality conditions (and on whether negative values can occur and how they are represented in the A10.)
2. Having composed a SELECT that satisfies (1), can the Focus interface to your RDBS be induced to generate such a SELECT to accomplish the single-key join? (If not, you're going to have to resort to SQL passthru.)
3. How to extend that to a two-key join: What's the Focus syntax for a define-based compound-key join?
Do you have you a solution in hand for #1?
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
When all else fails, I create hold files and concatenate my two fields into one for each file, then do the join on the concatenated fields. Works like a charm!
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003