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.
Do we have any concept of subquerry in webfocus ? If yes, any pointer regarding where the below code going wrong ??
TABLE FILE B_SQL_CONTRACTSCHEDOFVALUES
SUM
SCHEDULEDVALUE
BY B_SQL_CONTRACTSCHEDOFVALUES.PROJECTID
WHERE PROJECTID IN (
TABLE FILE HLDDTL1
PRINT PROJECTID
END
)
ON TABLE HOLD AS HLDDTL2 FORMAT FOCUS INDEX PROJECTID
END
Sam, Webfocus does have a statement like 'where field in ...', but the individual values should be a file, not a new request. So turn the order around, first create your hold file with the values to be tested for, next create your table request that uses the just created hold file. So, in your piece of code it would read:
TABLE FILE HLDDTL1
PRINT PROJECTID
ON TABLE HOLD
END
TABLE FILE B_SQL_CONTRACTSCHEDOFVALUES
SUM
SCHEDULEDVALUE
BY B_SQL_CONTRACTSCHEDOFVALUES.PROJECTID
WHERE PROJECTID IN (HOLD);
ON TABLE HOLD AS HLDDTL2 FORMAT FOCUS INDEX PROJECTID
END
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Just an added note. If you are going to use Where Projectid EQ (DDNAME) and the number of projectid's is large - then you should be aware that there is a 3200 byte limitation. If you believe you are going to exceed THAT NUMBER, then you should be prepared to either (A) split the records into more than one file or (better yet) use (B) a 'decode ddname' where you get 32000 bytes. Again, if you know the number of records is going to be relatively small consistently - then the technique suggested is perfectly fine as is.
There is not a sub-query per-se. But as indicated by other posts, you can use multiple queries, in sequence, to do the same thing.
This may be overly simplistic, but since you're really not requiring any FOCUS-specific functionality, just write this query using SQL-passthru, as this seems to be what you're most familiar with. Sounds like that would be the simplest approach, require least code, least IO, no hold/ external files to reference, everything handled by the DB.
Lots of documentation and additional posts exist regarding SQL-passthru.
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