>>Hi Ed,
>>
>>>Ranks up there with DELETE FOR DELETED(), certainly.
>>
>>But make sure you have an index on DELETED(), otherwise it's similar to WAIT WAITLONG. *g*
>
>I see we've finally found a good reason for an index on deleted() :)
Another, more serious, use would be to trigger the equivalent of a PACK when greater than a certain # or certain % of all records were DELETED().
LOCAL nDeletedCount
Select (cSomeAlias)
COUNT TO nDeletedCount FOR DELETED()
IF nDeletedCount > nSomeTriggerValue