|
|
|
@ -384,8 +384,20 @@ and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr
@@ -384,8 +384,20 @@ and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr
|
|
|
|
|
and S.studiengangs_typ_kb ='MSG' |
|
|
|
|
and tmp_studien2.tsg_generated=1 |
|
|
|
|
and tmp_studien2.st_sem_nr=S.st_sem_nr |
|
|
|
|
and S.status_historie=1 |
|
|
|
|
|
|
|
|
|
--Defaultmäßig den letzten Status im Semester nehmen (status_historie=1) |
|
|
|
|
--Ausnahme: wenn der MSG bis zum Semesterende läuft und Status X hat, |
|
|
|
|
--wird er auf den vorherigen Status gesetzt, weil der Studi |
|
|
|
|
--bis Semesterende studiert hat |
|
|
|
|
and ( |
|
|
|
|
(S.status_historie=1 and |
|
|
|
|
( |
|
|
|
|
S.gueltig_ab < S.semester_ende or (S.gueltig_ab >= S.semester_ende and S.studienstatustyp !='X') |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
or |
|
|
|
|
(S.status_historie=2 and S.gueltig_ab < S.semester_ende) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
--statustyp_tsg nachladen: |
|
|
|
@ -491,6 +503,8 @@ from cifx where key=400
@@ -491,6 +503,8 @@ from cifx where key=400
|
|
|
|
|
and apnr=tmp_studien3.statustyp_tsg |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
drop table tmp_studien2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -667,6 +681,28 @@ cast (NULL as int) as studiengang_nr2,
@@ -667,6 +681,28 @@ cast (NULL as int) as studiengang_nr2,
|
|
|
|
|
-- and matrikelnummer = '5847370' |
|
|
|
|
where kz_rueck_beur_ein is null |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
--Wenn pro Semester und Matrikelnr. keine studiengang_nr=1 existiert, werden diese um 1 reduziert: |
|
|
|
|
select st_studstamm_nr,semester,min(studiengang_nr) as studiengang_nr_min |
|
|
|
|
into temp tmp_studien_ohne_studiengangnr_1 |
|
|
|
|
from costage_st_studien_aggr |
|
|
|
|
where kz_rueck_beur_ein is not null |
|
|
|
|
group by 1,2 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
update costage_st_studien_aggr set studiengang_nr=studiengang_nr -1 |
|
|
|
|
where studiengang_nr > 1 |
|
|
|
|
and tsg_generated=1 |
|
|
|
|
and not exists (select S.st_studstamm_nr from tmp_studien_ohne_studiengangnr_1 S |
|
|
|
|
where S.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr |
|
|
|
|
and S.semester=costage_st_studien_aggr.semester |
|
|
|
|
and S.studiengang_nr_min=1 |
|
|
|
|
) |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
drop table tmp_studien_ohne_studiengangnr_1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--HZB Data: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|