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]Join Issue where second Join is conditional?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Join Issue where second Join is conditional?
 Login/Join
 
Member
posted
I would like to create a 3 table (perhaps more if I can get this to work) join. I've been able to do this using the standard join syntax where i join a to b and then using a field in b i can join to c. However, now my join b to c is a conditional join and it does not seem to be working. no matter what i try i always get an error.

my syntax is:

JOIN INNER FILE ORD_OVERTIME_SUMMARY AT EMPLOYEE_ID
TO UNIQUE FILE ORD_EMPLOYEE AT EMPLOYEE_ID
WHERE ORD_OVERTIME_SUMMARY.EMPLOYEE_ID EQ ORD_EMPLOYEE.EMPLOYEE_ID ;
END

JOIN INNER FILE ORD_OVERTIME_SUMMARY AT ORD_EMPLOYEE.EMPLOYEE_NAME
TO UNIQUE
FILE ORD_CODES AT ORD_CODES.CODE_TYPE_NUMBER

WHERE ORD_CODES.CODE_TYPE_NUMBER EQ '3' ;
WHERE ORD_EMPLOYEE.PAYING_AGENCY EQ ORD_CODES.CODE_VALUE;

END


Running the above returns a (FOC370) THE FIELDNAME USED IN JOIN CANNOT BE FOUND IN THE FILE: ORD_EMPLOYEE.EMPLOYEE_NAME

Note EMPLOYEE_NAME in table ORD_EMPLOYEE which I should have after the first join.

ORD_CODES is a code table that has translations for many different kinds of fields. Each translation has a number identifying the type of translation. For example "3' is for PAYING AGENCIES. 4 might be for Departments, etc. I know I can break the codes table into many different tables so I can eliminate the need to use a conditional Join. I also know I can do many TABLE and HOLD for each type of code and then join to the HOLD files but this will be slow and this is for an online reporting application. Are these kinds of Joins doable? Please help. I am under the gun to get this application up and running.

This message has been edited. Last edited by: <Emily McAllister>,


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
Expert
posted Hide Post
The second JOIN is clobbering the first JOIN. You need to use the AS keyword to differentiate between the JOINs. Additionally, You can use the TAG keyword to prefix the column names of each join. Please take a look at the JOIN documentation in the WebFOCUS Language Documentation.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
THANK YOU!!!!!! ALL WORKING!!!!

I've been using FOCUS for 20 years and forgot when you don't name the JOIN the first goes away. I was trying to simplify the code and I removed the tags and join names.


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report 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]Join Issue where second Join is conditional?

Copyright © 1996-2020 Information Builders