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.
SET ASNAMES=ON TABLE FILE CAR SUM DEALER_COST AS 'TDEALER_COST' SUM DEALER_COST BY CAR ON TABLE HOLD AS H001 END TABLE FILE H001 PRINT DEALER_COST TDEALER_COST BY CAR END
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 CAR
SUM DEALER_COST DEALER_COST WITHIN TABLE
BY CAR
END
Wow, Mickey - I did not know that!!!
quote:
You can also use WITHIN TABLE, which allows you to return the original value within a request command. The WITHIN TABLE command can also be used when an ACROSS phrase is needed without a BY phrase. Otherwise, a single WITHIN phrase requires a BY phrase.
Now that's a mouthful!
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
Assuming you want TOTAL COUNT OF THE CARS within the cars a count might work for you. END TABLE FILE CAR SUM CNT.DST.MODEL AS 'COUNT' DEALER_COST BY CAR ON TABLE COLUMN-TOTAL END
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
DEFINE FILE CAR
DST_COUNT/I3 WITH DEALER_COST = IF DEALER_COST NE LAST DEALER_COST THEN 1 ELSE 0;
END
TABLE FILE CAR
SUM DST_COUNT AS 'Distinct,Cost,Count'
TOT.DST_COUNT WITHIN TABLE AS 'Total,Dealer,Costs'
BY CAR
ON TABLE SUMMARIZE DST_COUNT
END
-RUN
TThis message has been edited. Last edited by: Tony A,
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
DEFINE FILE CAR BLANK/A1 WITH CAR = ' '; END TABLE FILE CAR SUM CNT.DST.DEALER_COST BY BLANK ON TABLE HOLD END JOIN BLANK WITH CAR IN CAR TO BLANK IN HOLD AS H DEFINE FILE CAR BLANK/A1 WITH CAR = ' '; END TABLE FILE CAR SUM CNT.DST.DEALER_COST H.DEALER_COST BY CAR END
Should give the results that sayed asked for at 4:18...
It is just that I am wary of using LAST with a non-key field in case there are duplicate values - been bitten by that before.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007