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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Filter child records by a specific value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Filter child records by a specific value
 Login/Join
 
Silver Member
posted
I have two tables joined together as a left outer join. Table A may or may not be related to records in table B and they have a variety of relationship types. I want to show all records in table A (whether there is a relationship or not) and only those in table B where relationship type = a specific value.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.0.09
Windows, All Outputs
 
Posts: 36 | Registered: November 19, 2014Report This Post
Platinum Member
posted Hide Post
Melissa,

Have you tried to add a "where clause" (conditional join) to your join; such as:

WHERE B.TableB_Field = Spec_Value

Thanks

Luiz
 
Posts: 117 | Location: Denver | Registered: July 27, 2005Report This Post
Silver Member
posted Hide Post
Yes I did put the where clause on there, but then I don't get the records that don't have the relationship at all. I need to have both.


WebFOCUS 8.0.09
Windows, All Outputs
 
Posts: 36 | Registered: November 19, 2014Report This Post
Silver Member
posted Hide Post
There may be a 'correct' answer, but in this situation I would do 2 extracts using each set of rule and then merge the hold files together to create the whole extract. So I would do a normal join and extract the data with tablea-tableb match, then a separate left_outer join and extract the data where tableb data eq missing. Then merge the 2 hold files together with a 'table file' and 'more'.


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Silver Member
posted Hide Post
Sorry - I didn't notice this was in the infoassist forum so answered the question with a 'dev studio' hat on. Good luck with the problem.


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Guru
posted Hide Post
If you are using a LEFT_OUTER Join and have a WHERE clause with a specific value then any MISSING (ie NULL) values are automatically excluded. To bring back in those without a relationship try
WHERE B.TableB_Field EQ Spec_Value AND B.TableB_Field EQ MISSING


You may also need to add
SET ALL=PASS

depending on the adapter you are using

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report 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     [CLOSED] Filter child records by a specific value

Copyright © 1996-2020 Information Builders