Correct the purge SQL statement