Yes, Barry is absolutly right. It will not delete all duplicates. This will delete only the last record of each CPNP group if it is not first and also where plant=USM. If you wants to delete all duplicates and out of all duplicates you want to keep only the first record where plant=USM then you can go for the code given below:- WHERE PLANT='USM'; IF NOT FIRST.CPNP THEN DELETE; Sadhna
... View more