That's the best answer yet, Wol.
Assuming there's no Next-Sequential-Id counter to poll.
& assuming a large file, and an ongoing need. (If not, who cares?)
& assuming normal writes to the file aren't so frequent that maintaining
the extra index -- albeit ever so evenly distributed -- isn't too taxing
compared to the occasionally need for that max.
Probably reasonable assumptions, all.
cds
On 5/27/2011 10:34 AM, Wols Lists wrote:
On 27/05/11 14:33, Charles Stevenson wrote:
I am going to assume we are talking about a HUGE file, otherwise efficiency
wouldn't much matter.
I don't know a GOOD way outside basic or sql to prevent a sort-selected list
from being created. For humongous files, that may be painful.
Hmmm...
Assuming a huge file, as you suggest, create an index on @ID!
Indexes are always sorted, aren't they?
So either make it sort downwards or, if it's numeric, index on "nought minus
id" :-)
Then you can just
SELECTINDEX
READNEXT
CLEARLIST
All done!
Cheers,
Wol
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users