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.
SQL has a nice command, "TOP 1", which takes, as you can imagine, the TOP 1 record based on any remaining selection criteria (if any) and returns ONE record. The question is: What is the WebFOCUS CODE that produces the SQL Code for "TOP 1"? This would be seen in the result of a "SQL Trace" of the WebFOCUS code. Hint: It's not "BY HIGHEST 1".
BTW: This is going against Teradata.This message has been edited. Last edited by: Doug,
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
... I know that one... But, our rule, basically, is not use QL Passthru... And the DBA's say to use "TOP 1"... That's why I asked... But, in the meantime and seeing that I only need to know if there are any records returned, I'm using "CNT.DST.PURCHASING_GROUP"
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Equates to "SAMPLE 1" which reads the entire file then selects ONE random (sample) record from the answer set. This takes significantly longer then even a straight SUM.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
But, our rule, basically, is not use QL Passthru...
Then the pointy heads that make these rules should understand restrictive programming and ensure that best practice is designed for efficiency in data retrieval and not programming code.
Use the best tool for the job!
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Then the pointy heads that make these rules should understand restrictive programming and ensure that best practice is designed for efficiency in data retrieval and not programming code.
This should be our new mantra.
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
TABLE FILE TIME_D
SUM
TIME_DIM_KEY
BY HIGHEST TIME_DIM_KEY
WHERE READLIMIT EQ 1
END
This is generated:
SELECT T1."TIME_DIM_KEY", SUM(T1."TIME_DIM_KEY") FROM
TIME_D T1 GROUP BY T1."TIME_DIM_KEY" ORDER BY
T1."TIME_DIM_KEY" DESC FETCH FIRST 1 ROW ONLY FOR FETCH ONLY;
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