SET DELETED OFF >USE xyz EXCLUSIVE >DELETE ALL >INDEX ON Id TAG UniqueId UNIQUE > >SET ORDER TO Id >RECALL ALL >DELETE TAG UniqueID >SET ORDER TO SET DELETED ONI made few corrections. It's important to note, that this solution requires exclusive use of the table, while Sergey's solution doesn't require it.