"END LOOP;So, the problem is if there is an error in any of the id's, then the whole thing stops." . . . .