Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use sequence nbr to locate latest - how?

Status
Not open for further replies.

NewToThis2

Technical User
Mar 30, 2004
62
US
CRV10 - I have a history table that shows changes made, the date the change was made, and the sequence nbr. Let's say on 10/1/2004 an address changed to 187 Woods Lane (SEQ_NBR = 1) and for whatever reason, another change was entered that same day changing the address yet again to 189 Woods Lane (SEQ_NBR = 2). In my report, which identifies changes and when they happened, I only want the 2nd sequence to show up. There could be up to 6 sequences in this case, I would always want the "highest numbered" sequence in the report, so that could be 1 or 2 or 3, etc. Does anyone have any ideas on how I could do this? Thanks!
 
You can go to report->edit selection formula->GROUP and enter:

{table.SEQ_NBR} = maximum({table.SEQ_NBR},{table.groupfield})

You didn't specify what the group was, but I'm assuming there is one. This would return only the highest sequence number per group.

There is also a method using SQL expressions if you are able to them.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top