update enrollments set sponsor_id = ( select (CAST(e2.sponsor_id AS Integer)) from enrollments2 e2 where enrollments.id = e2.id);