@ -6,6 +6,8 @@ drop table if exists tmp_studien2;
@@ -6,6 +6,8 @@ drop table if exists tmp_studien2;
SELECT
SM . semester_tid as semester ,
SM . semester_anfang ,
SM . semester_ende ,
SG . st_absz_nr ,
SG . st_skz_nr ,
SG . studiengangs_identifikator ,
@ -218,6 +220,8 @@ M.st_studiengang_nr_msg,
@@ -218,6 +220,8 @@ M.st_studiengang_nr_msg,
T . st_studiengang_nr as st_studiengang_nr_tsg ,
M . st_studstamm_nr ,
E . semester_tid as semester ,
E . semester_anfang ,
E . semester_ende ,
E . st_sem_nr ,
M . startsemester ,
M . endsemester
@ -245,6 +249,8 @@ where T2.st_studstamm_nr is null
@@ -245,6 +249,8 @@ where T2.st_studstamm_nr is null
- - fehlende Semester nachtragen :
insert into tmp_studien2 ( semester ,
semester_anfang ,
semester_ende ,
st_absz_nr ,
st_skz_nr ,
studiengangs_identifikator ,
@ -275,6 +281,8 @@ hzb_art,
@@ -275,6 +281,8 @@ hzb_art,
fachsemester )
select M . semester ,
M . semester_anfang ,
M . semester_ende ,
st_absz_nr ,
S . st_skz_nr ,
S . studiengangs_identifikator ,
@ -313,7 +321,7 @@ and M.semester != S.semester
@@ -313,7 +321,7 @@ and M.semester != S.semester
- - and S . st_studiengang_nr_msg = 34454
- - and S . studiengangs_bezeichnung = ' Bildungswissenschaften '
- - and M . semester = 20211
group by 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 23 , 24 - - , 25 , 26 , 27 , 28
group by 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 23 , 24 , 25 , 26
;
- - statustyp und hrst nachladen :
@ -411,11 +419,30 @@ and T.st_studiengang_nr_msg=tmp_studien2.st_studiengang_nr_msg
@@ -411,11 +419,30 @@ and T.st_studiengang_nr_msg=tmp_studien2.st_studiengang_nr_msg
)
;
- - SPO - Version ( letzte im jew . Semester ) ermitteln :
select T . * , null : : char ( 10 ) as po_stp_stp_version_kb ,
max ( SPO . gueltig_ab ) as spo_max_gueltig_ab
into temp tmp_studien3
from tmp_studien2 T left outer join costage_st_studien_spoversionen SPO
on ( SPO . st_studium_nr = T . st_studium_nr
and SPO . gueltig_ab < T . semester_ende )
group by 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41
;
update tmp_studien3 set po_stp_stp_version_kb = SPO . po_stp_stp_version_kb
from costage_st_studien_spoversionen SPO
where SPO . st_studium_nr = tmp_studien3 . st_studium_nr
and tmp_studien3 . spo_max_gueltig_ab = SPO . gueltig_ab ;
drop table tmp_studien2 ;
delete from costage_st_studien_aggr
- - provisorisch in Testphase :
where $ { COSTAGE_STUDENT_FILTER } ;
create index ix_tmp_studien2 on tmp_studien2 ( kz_rueck_beur_ein )
create index ix_tmp_studien2 on tmp_studien3 ( kz_rueck_beur_ein )
;
insert into costage_st_studien_aggr (
st_studium_nr ,
@ -441,6 +468,7 @@ st_studium_nr,
@@ -441,6 +468,7 @@ st_studium_nr,
stufrm ,
kz_rueck_beur_ein ,
hzb_art ,
po_stp_stp_version_kb ,
summe
)
@ -479,8 +507,9 @@ select st_studium_nr,
@@ -479,8 +507,9 @@ select st_studium_nr,
studienform_statistik_code as stufrm ,
kz_rueck_beur_ein ,
hzb_art ,
po_stp_stp_version_kb ,
1 as summe
from tmp_studien2
from tmp_studien3
where kz_rueck_beur_ein is not null
;
@ -510,6 +539,7 @@ st_studium_nr,
@@ -510,6 +539,7 @@ st_studium_nr,
stufrm ,
kz_rueck_beur_ein ,
hzb_art ,
po_stp_stp_version_kb ,
summe
)
@ -549,8 +579,9 @@ cast (NULL as int) as studiengang_nr2,
@@ -549,8 +579,9 @@ cast (NULL as int) as studiengang_nr2,
studienform_statistik_code as stufrm ,
kz_rueck_beur_ein ,
hzb_art ,
po_stp_stp_version_kb ,
1 as summe
from tmp_studien2
from tmp_studien3
- - where semester = 20202
-- and matrikelnummer = '5847370'
where kz_rueck_beur_ein is null
@ -622,7 +653,7 @@ where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
@@ -622,7 +653,7 @@ where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A . st_adresse_typ = ' H '
;
drop table tmp_studien2 ;
drop table tmp_studien3 ;
drop table tmp_primaer_msg ;