Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] remove duplicate records or filter for Max? Last? DS 7.7.03

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] remove duplicate records or filter for Max? Last? DS 7.7.03
 Login/Join
 
Member
posted
Using WebFocus Developer Studio 7.7.03 - Excel 2007 output

I am working within one table (no joins) and I am receiving duplicate records by account number because there are multiple steps completed and captured. How do I return only one record per account number, showing only the maximum or using the LAST function so I can sort the completions in order and say if the last account isn't a duplicate, define as keep, else dup.

Example of my Current Output:
Account# Sequence Step Step Comp Date
20000000 1 Z01 10/01/2012
20000000 2 Z03 10/15/2012
20000000 3 Z04 10/15/2012
55500000 1 Z01 03/01/2011
55500000 2 Z03 03/05/2011
37000000 1 Z01 10/01/2012
37000000 2 Z03 06/05/2012
37000000 3 Z04 07/12/2012
37000000 4 Z13 07/27/2012
99999998 1 Z01 08/05/2011
99999998 2 Z03 08/20/2011
99999998 3 Z04 09/03/2011

The sequence number is really the key. The step name is not sequencial, they jump around a bit. Like in account #2, it's possible for 2 steps to be completed on the same day, but the sequencer determines which supercedes.

I need it to look like this:

Account# Sequence Step Step Comp Date
20000000 3 Z04 10/15/2012
55500000 2 Z03 03/05/2011
37000000 4 Z13 07/27/2012
99999998 3 Z04 09/03/2011

I can't seem to get the MAX function to work, so now I am thinking it might be the LAST function and something I need to define.

Can someone please help?

Thank you!

This message has been edited. Last edited by: reportmasterlvl3,


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
 
Posts: 22 | Registered: November 15, 2012Report This Post
Expert
posted Hide Post
SUM
LST.SEQUENCE
LST.COMP_DATE
BY ACCOUNT

BTW, we have over 900 users and all utilize InfoAssist just fine. It is an excellent tool for decentralizing simple reporting...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks Tom! That seemed to do the trick. I'm not a coder, and I've never looked at the source before, so I just threw it in there and it worked. Thanks again for the quick response.


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
 
Posts: 22 | Registered: November 15, 2012Report This Post
Gold member
posted Hide Post
Although you have a way, another is to do a BY HIGHEST 1 on SEQUENCE and as long as there are no duplicate Sequence numbers it should work the same with PRINT or SUM.

SUM
STEP_STEP
COMP_DATE
BY ACCOUNT
BY HIGHEST 1 SEQUENCE


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Member
posted Hide Post
Thanks for your contribution, Crymsyn! There are no duplicate sequence numbers, so this method works as well, and is actually more simple and my query runs faster. Awesome! Thanks again.

This message has been edited. Last edited by: reportmasterlvl3,


wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
 
Posts: 22 | Registered: November 15, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] remove duplicate records or filter for Max? Last? DS 7.7.03

Copyright © 1996-2020 Information Builders