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.
I thought this would be easy. I wanted to use an existing SQL table to select order numbers for a calculated date range. Then use that list to select records from one of our Universe databases to extract information from it. I used the following code (sorry if I paste anything wrong - still fairly new on this):
-SET &TODAY = &YYMD;
-RUN
SET HOLDLIST = PRINTONLY
DEFINE FILE SALES_CURR_PREV_FY_US
CURR_DATE/YYMD=&TODAY.EVAL;
START_MONTH/YYMD=DATEADD(CURR_DATE, 'M', -3);
START_DATE/YYMD=DATEMOV(START_MONTH, 'BOM');
END
TABLE FILE SALES_CURR_PREV_FY_US
SUM
'SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.ORDER_NUM/A10V'
BY 'SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.ORDER_NUM' NOPRINT
WHERE ( SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.GL_DATE_MDYY GE START_DATE ) AND ( SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.GL_DATE_MDYY LE CURR_DATE );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS LEDHOLD FORMAT ALPHA
END
JOIN
LEFT_OUTER LEDHOLD.LEDHOLD.ORDER_NUM IN LEDHOLD TO UNIQUE
LEDGER_LOG_US.LEDGER_LOG_US.@ID IN LEDGER_LOG_US TAG J0 AS J0
END
TABLE FILE LEDHOLD
PRINT
'LEDHOLD.LEDHOLD.ORDER_NUM'
'J0.LEDGER_LOG_US.@ID'
'J0.LEDGER_LOG_US.ORDER_CMTS'
HEADING
""
FOOTING
""
WHERE RECORDLIMIT EQ 10
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
.
.
.
If I reverse the JOIN of the files (and make it an INNER join) I get the following error:
0 NUMBER OF RECORDS IN TABLE= 314295 LINES= 182493 (FOC1070) VALUE FOR JOIN 'FROM' FIELD OUT OF SEQUENCE. RETRIEVAL ENDED
My first question is can anyone explain why I get an error one way but not the other? I think it has more to do with the Universe which uses PICK databases (which are non-relational). Can anyone provide me with some wisdom on when or how to join databases? I have had training on JOIN's but it all works great when it is in SQL format. It seems to me that it should be straight forward to join a value from a hold file to the key of another database. What am I missing?This message has been edited. Last edited by: Glenn C.,
WebFOCUS 7.7.03 Windows all output (Excel, HTML, PDF)
The format of LEDGER_LOG_US.LEDGER_LOG_US.@ID is A10V which is the same ORDER_NUM in the hold file. I'm wondering does LEDGER_LOG_US need to be indexed for the join to work? I just find it very strange that I don't get an error at all. I checked the source to make sure.
WebFOCUS 7.7.03 Windows all output (Excel, HTML, PDF)