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.
JOIN
LEFT_OUTER F0115.ADDRESS_NUMBER IN F0115 TO ALL
F01151.F01151.ADDRESS_NUMBER IN F01151
END
TABLE FILE F0115
PRINT
'DST.F0115.PHONE_NUMBER_TYPE' AS 'PHONE TYPE'
'DST.F0115.PHONE_NUMBER' AS 'PHONE NUMBER'
'DST.F01151.ELECTRONIC_ADDRESS_EAEMAL' AS 'EMAIL ADDRESS'
BY 'F0115.F0115.ADDRESS_NUMBER' AS 'CUSTOMER NUMBER'
WHERE F0115.F0115.ADDRESS_NUMBER IN ('7994731','5956693','6232451','7392422','953215')
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
END
When I run the report, I get the data as expected. Please go to the following URL to view the data I get.
If I add the WHERE clause in my code. I don't get any data. I should get all the data where the condition is true.
Here is the code with the where clause:
CODE]
JOIN LEFT_OUTER F0115.ADDRESS_NUMBER IN F0115 TO ALL F01151.F01151.ADDRESS_NUMBER IN F01151 END TABLE FILE F0115 PRINT 'DST.F0115.PHONE_NUMBER_TYPE' AS 'PHONE TYPE' 'DST.F0115.PHONE_NUMBER' AS 'PHONE NUMBER' 'DST.F01151.ELECTRONIC_ADDRESS_EAEMAL' AS 'EMAIL ADDRESS' BY 'F0115.F0115.ADDRESS_NUMBER' AS 'CUSTOMER NUMBER' WHERE F0115.F0115.ADDRESS_NUMBER IN ('7994731','5956693','6232451','7392422','953215'); WHERE F01151.F01151.ELECTRONIC_ADDRESS_EAEMAL EQ ''; ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET HTMLCSS ON END [/CODE]
When I run the report with the WHERE clause I get the following message:
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0This message has been edited. Last edited by: Kerry,
I should get all the data where the condition is true.
Well, not necessarily. It all depends on what your JOIN is doing. If there are no records in F01151 matching those in F0115 (interesting naming convention by the way) then due to the OUTER JOIN structure you have, you'd get existing values in F0115 but the corresponding ones in F01151 will be MISSING (null).
If what you need is perhaps the list of ADDRESS_NUMBER's in F0115 for which a corresponding email addresses has not been created (that is, there is no matching record in F01151) then you could attempt the following filter:
WHERE F01151.F01151.ELECTRONIC_ADDRESS_EAEMAL IS MISSING;
Again, it'd really help to know what exactly you're trying to achieve so we can provide more meaningful ideas.
Hmmm, there could also be a possibility of using SET ALL=PASS but it would not work if your data source is not FOCUS.
I think I saw once a setting such as SET ALL=SQL but I cannot really elaborate as to what it does or if it's even related to the subject but you can check that in either the product's documentation or other posts in this forum.This message has been edited. Last edited by: njsden,
I am actually trying to pull all the address #s where the email is blank.
I need to list the address #, phone type, phone # with the blank email.
I am using JDE which uses Oracle DB2 (that is where the interesting table names are coming from .
I am not sure how to accomplish this.
For the same records I get Address#, phone type, phone# and email addresses if I don't user the WHERE clause and that is how I know the address# which don't have the email addresses but if I use the WHERE clause I don't get any records.
What you need to do is Hold the output of the join and then read in the Hold file and apply the Where clause to it. The way Focus works is that it applies the where clause and will not return any records when the field you are testing is missing (blank).
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
You should run your code woth SQL trace turned on and check the SQL being passed to your RDBMS. I suspect the WHERE clause on a column in the foreign/child table is causing the SQL translator to replace the LEFT OUTER join with a standard join. This would produce the results you are seeing. You could try either SET ALL = SQL or, more likely, SET ALL = PASS as njsden suggested. Or, as a last resort, you could do what RSquared suggested and hold the results without the offending WHERE clause and then apply the filter to the HOLD file.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007