Inline procedure oracle
DECLARE
v_id_parent integer;
v_id integer;
CURSOR CUR_ACTION_FORMATION IS
SELECT id_action_formation,id_action_parent FROM action_formation;
BEGIN
OPEN CUR_ACTION_FORMATION;
LOOP
FETCH CUR_ACTION_FORMATION INTO v_id, v_id_parent;
-- dbms_output.put_line(v_id_parent);
update action_formation set crf_diffuseur = (SELECT max(id_centre) FROM centre_action_organisme
where id_action_formation=v_id) where id_action_formation=v_id;
EXIT WHEN CUR_ACTION_FORMATION%NOTFOUND;
END LOOP;
commit;
CLOSE CUR_ACTION_FORMATION;
END;
Aucun commentaire:
Enregistrer un commentaire