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.
Wow....who knew a join could be so complicated. I have been trying to pull this report since Monday to no avail. Here's my issue...I have three tables. Table1 has financial aid (money), Table2 has Rooms, and Table3 has Meals. I want all people who have money and have a room, meal or both. I'm trying to create a left outer join because I realize that the query was only pulling students who had money of course, but had both room and meal. I want them even if they only have room or meal. I'm working in dev studio procedure viewer and I've changed the join to single instance left outer but the report still looks the same. The documentation is very vague. Is there something else I need to do. Please help!!!!
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
No I haven't...where would i do that? Do i use the set icon (picture of light switch)? Hate to sound ignorant...but the truth is I am still learning. So much to digest!
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
FILENAME=SLRMASG, SUFFIX=SQLORA , REMARKS='Meal Assignment Table', $ SEGMENT=SLRMASG, SEGTYPE=S0, $ FIELDNAME=SLRMASG_PIDM, ALIAS=SLRMASG_PIDM, USAGE=P9, ACTUAL=P5, DESCRIPTION='This field defines the internal identifier associated with the meal assignments', $ FIELDNAME=SLRMASG_TERM_CODE, ALIAS=SLRMASG_TERM_CODE, USAGE=A6V, ACTUAL=A6V, DESCRIPTION='This field defines the term code associated with the meal assignments', $ FIELDNAME=SLRMASG_MRCD_CODE, ALIAS=SLRMASG_MRCD_CODE, USAGE=A4V, ACTUAL=A4V, DESCRIPTION='This field defines the meal plan code', $ FIELDNAME=SLRMASG_BEGIN_DATE, ALIAS=SLRMASG_BEGIN_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the first day of the meal assignment', $ FIELDNAME=SLRMASG_END_DATE, ALIAS=SLRMASG_END_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the last day of the meal assignment', $ FIELDNAME=SLRMASG_TOTAL_DAYS, ALIAS=SLRMASG_TOTAL_DAYS, USAGE=P11.5, ACTUAL=P5, DESCRIPTION='This field identifies the total number of days of the meal assignment', $ FIELDNAME=SLRMASG_TOTAL_MONTHS, ALIAS=SLRMASG_TOTAL_MONTHS, USAGE=P9.5, ACTUAL=P4, DESCRIPTION='This field identifies the total number of months of the meal assignment', $ FIELDNAME=SLRMASG_TOTAL_TERMS, ALIAS=SLRMASG_TOTAL_TERMS, USAGE=P9.5, ACTUAL=P4, DESCRIPTION='This field identifies the total number of terms of the meal assignment', $ FIELDNAME=SLRMASG_MSCD_CODE, ALIAS=SLRMASG_MSCD_CODE, USAGE=A2V, ACTUAL=A2V, DESCRIPTION='This field identifies the meal plan status code of the meal assignment', $ FIELDNAME=SLRMASG_MSCD_DATE, ALIAS=SLRMASG_MSCD_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field defines the date the meal plan status code was last updated', $ FIELDNAME=SLRMASG_ONL_OR_BAT, ALIAS=SLRMASG_ONL_OR_BAT, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether the meal assignment was created on-line or batch using the batch scheduler', $ FIELDNAME=SLRMASG_ACTIVITY_DATE, ALIAS=SLRMASG_ACTIVITY_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the date the record was created or last updated', $ FIELDNAME=SLRMASG_AR_IND, ALIAS=SLRMASG_AR_IND, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether the meal assignment charges have been processed', $ FIELDNAME=SLRMASG_ROLL_IND, ALIAS=SLRMASG_ROLL_IND, USAGE=A1V, ACTUAL=A1V, MISSING=ON, DESCRIPTION='This field controls whether the meal assignment can be rolled using the roll forward process', $ FIELDNAME=SLRMASG_ASSESS_NEEDED, ALIAS=SLRMASG_ASSESS_NEEDED, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether fee assessment is needed for the meal assignment', $ FIELDNAME=SLRMASG_DATA_ORIGIN, ALIAS=SLRMASG_DATA_ORIGIN, USAGE=A30V, ACTUAL=A30V, MISSING=ON, DESCRIPTION='DATA SOURCE: Source system that created or updated the row', $ FIELDNAME=SLRMASG_USER_ID, ALIAS=SLRMASG_USER_ID, USAGE=A30V, ACTUAL=A30V, MISSING=ON, DESCRIPTION='USER ID: User who inserted or last update the data', $
FILENAME=SLRRASG, SUFFIX=SQLORA , REMARKS='Room Assignment Table', $ SEGMENT=SLRRASG, SEGTYPE=S0, $ FIELDNAME=SLRRASG_PIDM, ALIAS=SLRRASG_PIDM, USAGE=P9, ACTUAL=P5, DESCRIPTION='This field defines the internal identifier associated with the room assignments', $ FIELDNAME=SLRRASG_BLDG_CODE, ALIAS=SLRRASG_BLDG_CODE, USAGE=A6V, ACTUAL=A6V, DESCRIPTION='This field identifies the building code of the room assignment', $ FIELDNAME=SLRRASG_ROOM_NUMBER, ALIAS=SLRRASG_ROOM_NUMBER, USAGE=A10V, ACTUAL=A10V, DESCRIPTION='This field identifies the room number of the room assignment', $ FIELDNAME=SLRRASG_TERM_CODE, ALIAS=SLRRASG_TERM_CODE, USAGE=A6V, ACTUAL=A6V, DESCRIPTION='This field defines the term associated with the room assignments', $ FIELDNAME=SLRRASG_RRCD_CODE, ALIAS=SLRRASG_RRCD_CODE, USAGE=A4V, ACTUAL=A4V, DESCRIPTION='This field defines the room rate code associated with the assignment', $ FIELDNAME=SLRRASG_BEGIN_DATE, ALIAS=SLRRASG_BEGIN_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the first day of the room assignment', $ FIELDNAME=SLRRASG_END_DATE, ALIAS=SLRRASG_END_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the last day of the room assignment', $ FIELDNAME=SLRRASG_TOTAL_DAYS, ALIAS=SLRRASG_TOTAL_DAYS, USAGE=P11.5, ACTUAL=P5, DESCRIPTION='This field identifies the total number of days of the room assignment', $ FIELDNAME=SLRRASG_TOTAL_MONTHS, ALIAS=SLRRASG_TOTAL_MONTHS, USAGE=P9.5, ACTUAL=P4, DESCRIPTION='This field identifies the total number of months of the room assignment', $ FIELDNAME=SLRRASG_TOTAL_TERMS, ALIAS=SLRRASG_TOTAL_TERMS, USAGE=P9.5, ACTUAL=P4, DESCRIPTION='This field identifies the total number of terms of the room assignment', $ FIELDNAME=SLRRASG_ASCD_CODE, ALIAS=SLRRASG_ASCD_CODE, USAGE=A2V, ACTUAL=A2V, DESCRIPTION='This field identifies the status code of the room assignment', $ FIELDNAME=SLRRASG_ASCD_DATE, ALIAS=SLRRASG_ASCD_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field defines the date the room plan status code was last updated', $ FIELDNAME=SLRRASG_ONL_OR_BAT, ALIAS=SLRRASG_ONL_OR_BAT, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether the room assignment was created on-line or batch using the batch scheduler', $ FIELDNAME=SLRRASG_ACTIVITY_DATE, ALIAS=SLRRASG_ACTIVITY_DATE, USAGE=HYYMDS, ACTUAL=HYYMDS, DESCRIPTION='This field identifies the date the record was created or last updated', $ FIELDNAME=SLRRASG_AR_IND, ALIAS=SLRRASG_AR_IND, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether the room assignment charges have been processed', $ FIELDNAME=SLRRASG_OVERLOAD_IND, ALIAS=SLRRASG_OVERLOAD_IND, USAGE=A1V, ACTUAL=A1V, MISSING=ON, DESCRIPTION='This field identifies whether an overload condition existed to allow the room assignment', $ FIELDNAME=SLRRASG_ROLL_IND, ALIAS=SLRRASG_ROLL_IND, USAGE=A1V, ACTUAL=A1V, MISSING=ON, DESCRIPTION='This field controls whether the room assignment can be rolled using the roll forward process', $ FIELDNAME=SLRRASG_OVERRIDE_ERROR, ALIAS=SLRRASG_OVERRIDE_ERROR, USAGE=A1V, ACTUAL=A1V, MISSING=ON, DESCRIPTION='This field identifies whether an error override condition existed to allow the room assignment', $ FIELDNAME=SLRRASG_ASSESS_NEEDED, ALIAS=SLRRASG_ASSESS_NEEDED, USAGE=A1V, ACTUAL=A1V, DESCRIPTION='This field identifies whether fee assessment is needed for the room assignment', $ FIELDNAME=SLRRASG_DATA_ORIGIN, ALIAS=SLRRASG_DATA_ORIGIN, USAGE=A30V, ACTUAL=A30V, MISSING=ON, DESCRIPTION='DATA SOURCE: Source system that created or updated the row', $ FIELDNAME=SLRRASG_USER_ID, ALIAS=SLRRASG_USER_ID, USAGE=A30V, ACTUAL=A30V, MISSING=ON, DESCRIPTION='USER ID: User who inserted or last update the data', $
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
However, since your data source is an RDBMS, i.e. Oracle, using this setting or the SET ALL setting will disable optimization and WebFOCUS will do the join anyway. If your tables are large, this might not be a good thing to do. I could go on and on here about relational efficiencies but I won't for now. Why don't you play with this for now and let us know how it goes.
We may have to create some sample data and construct a model for you.
It sounds like this would be easier if you used MATCH FILE to find the people you are looking for. MATCH FILE is built for just this type of comparison.
I do not use DS so I cannot tell you how to create this in DS.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
DS can be a big help. But you may want to learn how to use the code...because it is a big help to understanding what you are doing. As you can see by the majority of posts here on the Forum...they are mainly referencing code. So don't let it scare ya.
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
Your problem could be 2 things...before you try doing a Match 1. Your Where Statments try elimintating one or more and see what you get 2. taking out the word Unigue and the Left Outer Join. With SET ALL=ON it is Equivalent to a left outer Join when using ALL. Try changing Unique to ALL. or eliminating all together.
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
Hi Prarie...I tried the 2nd suggestion. I changed the single instance to multiple and change the joins from left outer to unspecified and set All on. Is that the same?????? Well here's the error I got.
0 ERROR AT OR NEAR LINE 171 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC029) ALL SORT KEYS ARE NOT IN A SINGLE TOP-TO-BOTTOM SEGMENT PATH
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
One problem is that you have WHERE clauses in your Table and logically these are saying that any missing data fails the Where test. Hence they are negating the Left outer join.
You have to put the WHERE statements inside of the join. Its a feature called JOIN-WHERE and is documented.
The setting of ALL is irrelevant for a Unique join. But as it stands the joins are not unique.
The key is to move the Where's regarding room assignment and mealplan assignment attributes into the respective joins (making them what the WF documentation refers to as "conditional" joins). That tells Focus that the uniqueness is true only after applying the Where condition(s).
Focus should generate appropriate SQL to pull balance-table columns, and the matching room-table columns (populated if a matching qualified row it exists; nulls/zeros/blanks if not), and the matching meal-table columns (similarly).
Verify: inspect the returned data, and desk-check the generated SQL. The data at this point should pick up all students satifying balance conditions, and their current term's room and meal assignment data (populated or null as the case may be). You would expect that all four possible combinations of room present or null and meal present or null will be representetd in the answerset.
Then add a condition to the TABLE request: WHERE TOTAL (...) OR (...); WF should add a corresponding HAVING clause in the generated SQL, to exclude any answer-set rows where both room and meal data returned are 'null'.
Verify again, and that should do it.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Your suggestion makes a lot of sense. Since yesterday I've been fighting with the match and getting the same results. I do believe it is my where clause. So now I'm back to the join....however, I can't find the documentation on Join-Where. I've been reading up on conditional joins. In Dev Studio..in the join dialog box I don't see a tool that allows for a Join-Where. How do I put the where statements on the join? I'm becoming very discouraged....it seems you have to know some focus language to get reports.
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
Where is this documentation? I'm using the help in Dev Studio. Is there something else I should be looking at that could help me more? Someone may have given me the info....but when I took the class there was so much info given.....
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
Thanks Tom...it's the same info i've been reading. Most of it gives syntax examples. I guess I have to learn focus language. They sold us on the fact that we could do most things with the gui tool (((. Not that easy!!!!!
WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML