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 am trying to limit using a where/if test against our DB2 UDB v8 database in our test environment.
I have coded the following define:
DEFINE FILE AUPPR001_PPM_130_01_TBL01 EFF_MO/M=POL_EFFECTIVE_DT; END
POL_EFFECTIVE_DT as a smart date with a format of YYMD
The where condition is as follows:
WHERE ( EFF_MO EQ '7' OR '07' );
We are selecting this way since we may want all years, but only records with an effective month of 7.
However, when I perform a SQL trace, it shows that the where test cannot be passed.
13.55.08 BR (FOC2598) FOCUS IF/WHERE TEST CANNOT BE PASSED TO SQL : EFF_YR 13.55.08 BR (FOC2598) FOCUS IF/WHERE TEST CANNOT BE PASSED TO SQL : EFF_MO 13.55.08 BR (FOC2590) AGGREGATION NOT DONE FOR THE FOLLOWING REASON: 13.55.08 BR (FOC2594) AGGREGATION IS NOT APPLICABLE TO THE VERB USED 13.55.08 AE SELECT T1."POL_NB",T1."POL_EFFECTIVE_DT" FROM 13.55.08 AE AUPPR001.PPM_130_01_TBL01 T1 FOR FETCH ONLY;
Is there a way for me to pass the month condition directly to DB2?
Sharon
Prod: WF 7.1.4 Dev Studio/BID/Rcaster/Rlibrary/Managed Reporting/LINUX/DB2 UDB 8, SQL Server Test: WF 7.6.1 Dev Studio/BID/Rcaster/Rlibrary/Managed Reporting/LINUX/DB2 UDB 8, SQL Server Dev: WF 7.6.1 Dev Studio/BID/Rcaster/Rlibrary/Managed Reporting/LINUX/DB2 UDB 8, SQL Sever
13.55.08 BR (FOC2590) AGGREGATION NOT DONE FOR THE FOLLOWING REASON: 13.55.08 BR (FOC2594) AGGREGATION IS NOT APPLICABLE TO THE VERB USED
don't worry about this message it is because you are using print and not sum. As far as the other message if there is not field that has the month in it alone then you may want to see of SQL Pass thru will work.
WHERE POL_EFFECTIVE_DT FROM '01/07/2006' TO '31/07/2007'
Except she only wants data for the months of july 2006 and july 2007, not for aug 2006 to june 2007 which you would get with this where statement. The LIKE would probably be your best best. Only other option would be to create a DB2 view of this table where the date components are broken out. We have done this in several instances where we couldn't get anything else to work. Only requires a little more work from a DBA (which is sometimes hard to come by)
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
You got to my post seconds before I corrected typo.
The like clause you suggested will not pass wf syntax checking.
To get a clause that scans for 2005/6/7 etc would require a bit more dm (a loop for each year) but the output would be like this.
WHERE POL_EFFECTIVE_DT GE '01/07/2005' AND POL_EFFECTIVE_DT LE '31/07/2005' OR POL_EFFECTIVE_DT GE '01/07/2006' AND POL_EFFECTIVE_DT LE '31/07/2006' OR POL_EFFECTIVE_DT GE '01/07/2007' AND POL_EFFECTIVE_DT LE '31/07/2007'
Again the effort of doing this may not be worth the performance gain but the selection criteria WILL be passed to DB2, I guarantee.
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006
Thank you for the posts. I haven't been able to get any of the suggestions to pass to the database other than passing a full date with a between clause. I will open a case with tech support. Sharon