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     PLEASE help: MATCH one-to-many problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
PLEASE help: MATCH one-to-many problem
 Login/Join
 
<bigpgo>
posted
I'm trying to get the equivalent of a Left-Outer join in webfocus by doing MATCH with keyword "OLD". My 2 tables are A and B.

Table A: (ProjID = key):

ProjID ProjName ProjPhase
------ -------- ---------
1 bbq Phase1
2 bbq Phase1
3 bbq Phase2

Table BFrownerProjectName+ProjectPhase = key):

ProjectName ProjectPhase ProjInfo
----------- ------------ ---------
bbq Phase1 good
bbq Phase2 bad

Then I do:

MATCH FILE A
PRINT
ProjID
BY ProjName
BY ProjPhase
RUN

FILE B
PRINT
ProjectInfo
BY ProjectName AS ProjName
BY ProjectPhase AS ProjPhase
AFTER MATCH HOLD AS myReport OLD
END

TABLE FILE myReport ..
PRINT
ProjName ProjPhase ProjectInfo
..
END

This produces:
bbq Phase1 good
bbq Phase1 ''
bbq Phase2 bad

Note that it never finds a match for the 2nd record - the info is blank!!!
The match seems to assume it's a 1-to-1 relationship, and as soon as it finds a match in table B for the pair "bbq/Phase1", it stops trying to look for additional matches. Why??

I found this documentation online:

"If one set of sort fields is a subset of the other, then it�s a one-to-many merge (all that match.)OTHERWISE it�s a one-to-one".

Well, [ProjName, ProjPhase] is a subset of [ProjName, ProjPhase]. In fact, I tried throwing in some additional useless BY sort fields but I'm still getting 1-to-1. Any ideas? Thanks a lot.
 
Report This Post
Gold member
posted Hide Post
Using MATCH FILE is not only a question of MATCH-Phrase and BY columns, it is also a question of using the right verbs. In TechSupport Knowledge Base: Fine Tuning MATCH Processing you can find more about all this.

Have fun ! Wink
 
Posts: 54 | Location: Switzerland | Registered: May 13, 2003Report This Post
Expert
posted Hide Post
Big,
Use SUM, not Print, for the second part of the match.
However if you want to end up with records than there are currently in File A, then reverse the order of the match, and use HOLD NEW
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<bigpgo>
posted
Thank you - using SUM for the 2nd one did the trick!
 
Report 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     PLEASE help: MATCH one-to-many problem

Copyright © 1996-2020 Information Builders