Best Method to Locate First or Last Record of Each Group on Shared db

Any built in variables ? Other suggestions ?

Sequence. It will start over after each Summary. Then Select = 1

The original post specified a shared database. In that situation, the sequence won’t work without some extra work.

First of all, you’ll have to do some prep in advance, to make an extra field for the sequence. In the example below I’ll assume that you call this field GroupSequence.

Since the database is shared, you don’t want to run the sequence statement which would modify this for all users (and be very slow). The solution is to temporarily turn server updates off, essentially temporarily turning the database into a single user database.

serverupdate "off"
field "GroupSequence"
sequence 1
serverupdate "on"
select GroupSequence=1

This would select the first record of each group. However, I’m not sure that select is what you mean when you say locate. Maybe you might want to tell us a bit more about what you are actually trying to do.

Also, the sequence can only help you locate the first record of each group, not the last. Since I really don’t know what you are trying to achieve, I’m not going to try to answer that at this time.

Thank you both for the input, especially server performance insights. I’ll incorporate serverupdsate statements.

Screen capture of parts of the db

Wait a minute, it looks like you want to permanently mark the top ranked items. In that case, you should not use serverupdate off. You’ll just have to accept the performance hit.