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 have the following code in a define: WORK_DATE_YYMD/YYMD = '&DATEYYMD'; LAST_SAT_YYMD/YYMD = DATEMOV(WORK_DATE_YYMD,'EOW') - 6; WE/YYMD = LAST_SAT_YYMD; BEG_WK/YYMD = WE - 8; END_WK/YYMD = WE + 2;
I want the BEG_WK and END_WK to be date-time fields to use in a WHERE clause against a field on my file that is date-time HYYMDs format. Apparently, going the other way doesn't pass the variables thru SQl - making the HYYMDs file field a YYMD field in a define and comparing that to BEG_WK, END_WK.
Posts: 20 | Location: Syracuse NY | Registered: August 26, 2005
&SEL1 and &SEL2 are the values you can use in the SQL WHERE statement (you may need to remove the milliseconds or make them microseconds .9999 for your DBMS). Put the DM variables in quotes in the SQL statement:
WHERE DB_DATE BETWEEN '&SEL1' AND '&SEL2'
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks. I added this coding and it worked great. I didn't know you could use EDIT on an I8 field - always thought it needed to be A8. I put a trace on the run in dev studio and the focus code passed the WHERE statement through within it's internal SQL translator - which it didn't do before. It had just ignored the WHERE since I was using 2 DEFINED date fields to compare. With this coding I use the original file TRAN_DATE of HYYMDs.