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] Joining Tables with Multiple Join Fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Joining Tables with Multiple Join Fields
 Login/Join
 
Member
posted
I am working in Developer Studio and when trying to join Table A to Table B on more than one field (for example ID and DATE are in both tables), after i run my join and go back in, i see that Dev Studio adds the joined table in again and has a join seperately (one to ID and another join to the same table on DATE). If this worked correctly, there would be no issue, but it doesn't recognize that both fields HAVE to match in order to pull in the data. I'm not sure what its doing but it's not working properly. I read that i may need to create a concatenated field of the two fields i am looking to join properly and i've tried this and it works but I'd like to know if there is something i was doing wrong in the first place. I had the join set as a LEFT OUTER and on multiple instances. I have learned recently that there are two different ways to do joins (using the PASS settings with single or multiple instances???) but i am not very comfortable with it and have so far opted to use LEFT OUTER or INNER joins to accomplish what i'm trying to do. Is there anything wrong with that as well? Any info would be appreciated.

Thank you,

Andrea Sweating

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.11
Developer Studio / Report Painter / MRE
Unix / Solaris
Outputs: Excel, HTML,PDF
 
Posts: 13 | Location: New London, CT | Registered: March 26, 2009Report This Post
Gold member
posted Hide Post
Normally, I just type in the codes directly rather than using developer studio to generate the codes for me.

You're probably getting this code after using developer studio:

JOIN ID IN TABLE_A TO ID TABLE_B AS J0 END
JOIN DATE IN TABLE_A TO DATE IN TABLE_B AS J1 END

What you want to achieve is:
JOIN ID AND DATE IN TABLE_A TO ID AND DATE TO TABLE_B AS J0 END

I hope this helps.


Shirley Huang
WF 7.7.04M MRE BID DevStudio
WIN2003, SQL Server 2000/DB2
HTML/PDF/EXL2k/AHTML
iSM 6.16
 
Posts: 55 | Registered: May 05, 2006Report This Post
Master
posted Hide Post
what Shirley has provided will work with non-FOCUS DBs, but you can only join to one field in a FOCUS DB. You can work around this by adding a WHERE statement on the second field or by concatenating the 2 fields together (in both files) and joining on that field.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Member
posted Hide Post
I see - thank you both!


WebFOCUS 7.6.11
Developer Studio / Report Painter / MRE
Unix / Solaris
Outputs: Excel, HTML,PDF
 
Posts: 13 | Location: New London, CT | Registered: March 26, 2009Report 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] Joining Tables with Multiple Join Fields

Copyright © 1996-2020 Information Builders