declare
cursor nestor_versionen is
select inhalt, max(level) nes_level from nestor_verwendung connect by prior inhalt = behaelter start with behaelter in (select distinct vers_nummer from nestor_versionen where el_nummer in (select el_nummer from nestor_elemente where class_id = (select class_id from nestor_element_klasse where bereich = 'PAG_MOSTDB' and klasse = 'BUS'))) group by inhalt order by nes_level desc;
ret_val integer;
begin
dbms_output.enable(1000000);
ret_val := nestor_benutzer_kontext.f_nestor_set_bereich('PAG_MOSTDB');
dbms_output.put_line ('Set Bereich: ' || ret_val);
ret_val := nestor_benutzer_kontext.f_nestor_set_role('NESTOR_PROJEKTLEITER');
dbms_output.put_line ('Set Bereich: ' || ret_val);
for nestor_version in nestor_versionen
loop
-- dbms_output.put_line (nestor_version.inhalt);
ret_val := nestor_ableitungsbaum.F_NESTOR_CHECKIN_VERSION(nestor_version.inhalt);
if ret_val != 10020 then
dbms_output.put_line (nestor_version.inhalt || ':' || ret_val);
end if;
end loop;
end;
/
'cuda