SELECT filename SET ORDER TO fieldname SET KEY TO expr GO TOP SCAN DELETE ENDSCAN SET KEY TO SET ORDER TOI have tested it and it works, but I am not 100% sure if the code is safe? Somewhere in my mind I have a doubt, because I am filtering the records, then fetching the records one by one and deleting it. Will SCAN...ENDSCAN lose the reference of the records as any time? Am I going to confuse the fox in any case? What are the other safe ways? I cannot use DELETE ALL FOR.., because the tables and on the network and this will lock the entire file.