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 need to find the most recent transaction; a single invoice can have many post dates, some are the same date; the duplicate post dates have unique line item entry numbers. I know I can identify the row with the most recent post date, HOLD it, and then find the highest line item number, but is there is a way to do this in a single step? My goal is to extract the value in a different column, based on most recent post date and highest line item number.
Thank youThis message has been edited. Last edited by: Kerry,
WebFocus 762,7611, 7.7.02 XP for Dev/test; Linux Prod 7.6.2; MRE
Posts: 21 | Location: NYC | Registered: February 09, 2009
Pretty close. I am using: PRINT 'MAX.DM_FACT_INVOICE.DM_FACT_INVOICE.POST_DATE' NOPRINT BY 'DM_FACT_INVOICE.DM_FACT_INVOICE.INVOICE_NUM' BY HIGHEST 1 'DM_FACT_INVOICE.DM_FACT_INVOICE.POST_DATE' BY POST_DATE
But I am still getting a blank row where there was a 'duplicate' post_date. I need to eliminate the blank rows, I've tried a couple of of different sorts and "highest already. When this is working, I'll add the line item number.
Any suggestions?
WebFocus 762,7611, 7.7.02 XP for Dev/test; Linux Prod 7.6.2; MRE
Posts: 21 | Location: NYC | Registered: February 09, 2009
PRINT
'MAX.DM_FACT_INVOICE.DM_FACT_INVOICE.POST_DATE' NOPRINT
BY 'DM_FACT_INVOICE.DM_FACT_INVOICE.INVOICE_NUM'
BY HIGHEST 1 'DM_FACT_INVOICE.DM_FACT_INVOICE.POST_DATE'
BY POST_DATE
A couple of comments:
- The "MAX" won't do anything here. - The HIGHEST 1 won't do anything here, unless DM_FACT_INVOICE.DM_FACT_INVOICE.POST_DATE is a different column than POST_DATE. - The "blank rows", are they really blank, or are they simply blank sort field values?
If you need the latest date for each invoice number, have you tried:
SUM
INVOICE_NUM NOPRINT
BY INVOICE_NUM
BY HIGHEST 1 POST_DATE
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
I need to find the most recent transaction; a single invoice can have many post dates, some are the same date; the duplicate post dates have unique line item entry numbers. I know I can identify the row with the most recent post date, HOLD it, and then find the highest line item number, but is there is a way to do this in a single step? My goal is to extract the value in a different column, based on most recent post date and highest line item number.
I'm not seeing any reference to line number in your code. The earlier post by Danny-SRL about using BY HIGHEST 1 should have done the trick.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
This is the final working result: PRINT INVOICE_NUM NOPRINT CUR_FSC_CD INVOICE_BAL BY INVOICE_NUM BY HIGHEST 1 POST_DATE NOPRINT BY HIGHEST 1 LINE_ITEM
I will also try the idea with the DEFINE to concatenate two columns and see if its faster.
thank you
WebFocus 762,7611, 7.7.02 XP for Dev/test; Linux Prod 7.6.2; MRE
Posts: 21 | Location: NYC | Registered: February 09, 2009