This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
kurs:nested_table_als_column_type [2014/09/10 21:22] 127.0.0.1 external edit |
kurs:nested_table_als_column_type [2014/11/11 14:52] (current) mh |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code> | ||
+ | CREATE OR REPLACE PROCEDURE TEILNEHMER_EDUCATION | ||
+ | /* | ||
+ | + zusaetzlich zum teilnehmernamen eine zusätzliche | ||
+ | ausbildung (p_add_education) angeben und die an die schon vorhandenen | ||
+ | anhaengen und den Teilnehmer damit updaten | ||
+ | |||
+ | */ | ||
+ | (p_tln_name teilnehmer.tln_name%type, | ||
+ | p_add_education varchar2 | ||
+ | ) | ||
+ | AS | ||
+ | t_education education; | ||
+ | BEGIN | ||
+ | select coalesce(tln_education, education() ) into t_education | ||
+ | from teilnehmer | ||
+ | where tln_name = p_tln_name; | ||
+ | | ||
+ | -- dbms_output.put_line(t_education.count); | ||
+ | | ||
+ | t_education.extend; | ||
+ | t_education(t_education.last) := p_add_education; | ||
+ | | ||
+ | update teilnehmer set tln_education = t_education | ||
+ | where tln_name = p_tln_name; | ||
+ | | ||
+ | if t_education.count <> 0 then | ||
+ | for i in 1..t_education.last loop | ||
+ | -- dbms_output.put_line(t_education(1)||' '|| t_education.count); | ||
+ | dbms_output.put_line(t_education(i)); | ||
+ | end loop; | ||
+ | end if; | ||
+ | | ||
+ | | ||
+ | END TEILNEHMER_EDUCATION; | ||
+ | </code> | ||
+ | |||
+ | |||
<code> | <code> | ||
CREATE OR REPLACE | CREATE OR REPLACE |