Well, if you happen to be using Sql Server you can do that sort of thing in T-Sql. In Oracle, you can also accomplish the same thing using pl/sql. Either way i'd do it in a stored ...
Once it passes those validations, no more errors are expected and you can pump it over in one statement (well, could be an insert, a delete and maybe even a delete) to the final table. Since no more ...