-INSERT INTO profile_education (id, uid, grad_year, entry_year, eduid, degreeid, flags)
- SELECT 100, user_id, promo_sortie, promo, 20, 2, 'primary'
- FROM auth_user_md5;
+INSERT INTO profile_education (id, pid, grad_year, entry_year, eduid, degreeid, flags)
+ SELECT 100, u.user_id, u.promo_sortie, u.promo, e.id, d.id, 'primary'
+ FROM #x4dat#.auth_user_md5 AS u
+ LEFT JOIN profile_education_enum AS e ON (e.abbreviation = "X")
+ LEFT JOIN profile_education_degree_enum AS d ON (d.degree = "Ingénieur");