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     Suppress all but newest record

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Suppress all but newest record
 Login/Join
 
Member
posted
I am reporting off of a table that holds records (events) of unit movements. Units move several times a day. The report I am building will show all units, sorted by location, but I only want to show each unit once, by it's newest movement record. Fields are: unit, location, date, time, owner. The preferred format would be:

Unit Location Owner Date Time
UnitB - New York - Bill - 06/13/04 - 2103
UnitD - New York - Jean - 06/13/04 - 2200
UnitC - Chicago - Roy - 06/12/04 - 1535
UnitA - KanCity - Jim - 06/13/04 - 2040

In reality, UnitB has 5 other movement records, all older than 06/13/04 2103 hours. Does anyone out there have a suggestion on how to do this?
 
Posts: 9 | Location: Topeka | Registered: June 13, 2004Report This Post
Silver Member
posted Hide Post
you might want to try

BY UNIT
...
BY HIGHEST 1 TIME

hth,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
Drew:

Thanks for the suggestion. I have already tried that and it doesn't suppress the duplicates. I think if you have three movement records all showing the same date and time for a unit (it's possible) and those three records are newer than all the others, it outputs the line 3 times.
 
Posts: 9 | Location: Topeka | Registered: June 13, 2004Report This Post
Member
posted Hide Post
Yes, I checked the data and that is exactly what it is doing. Even though I am telling it to report the highest (1) date and highest (1) time for the unit, it grabs all of them if they are the same...
 
Posts: 9 | Location: Topeka | Registered: June 13, 2004Report This Post
Silver Member
posted Hide Post
in that case you might want to try something like:

-* concat a unique key, you may have to convert your date and time to an alpha or whatever
DEFINE FILE yyy
U_KEY/A99 = LOCATION | USER | ... other fields ;
END

TABLE ...

BY HIGHEST 1 U_KEY


hth,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Silver Member
posted Hide Post
or you might even want to look at something like

WHERE LOCATION NE LAST LOCATION AND
USER NE LAST USER AND
DATE NE LAST DATE AND
TIME NE LAST TIME;

just an idea,

drew
 
Posts: 46 | Location: San Francisco, California | Registered: April 14, 2003Report This Post
Expert
posted Hide Post
Mulder,
use the lst. prefix operator
assuming you have sorted your file so that the latest date is the bottom of each unit paragraph
SUM LST.OWNER LST.DATE LST.TIME BY UNIT BY LOCATION

works like a charm

umm. can we expect a Scully, from your same org? Razzer
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Susannah:

My counterpart is not the right gender. Big Grin
 
Posts: 9 | Location: Topeka | Registered: June 13, 2004Report 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     Suppress all but newest record

Copyright © 1996-2020 Information Builders