@ -50,6 +50,7 @@ null::date as anfdat,
@@ -50,6 +50,7 @@ null::date as anfdat,
null : : date as ruebeudat ,
null : : date as endedat ,
null : : smallint as kz_rueck_beur_ein ,
null : : smallint as kz_rueck_beur_ein_tsg ,
null : : char ( 10 ) as hzb_art ,
rank ( ) over ( partition by SM . st_sem_nr , S . st_studstamm_nr , SG . studiengangs_identifikator order by SA . gueltig_ab desc ) as status_historie
into temp tmp_studien
@ -433,7 +434,7 @@ into temp tmp_studien3
@@ -433,7 +434,7 @@ 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
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 , 42
;
update tmp_studien3 set po_stp_stp_version_kb = SPO . po_stp_stp_version_kb
@ -441,6 +442,10 @@ from costage_st_studien_spoversionen SPO
@@ -441,6 +442,10 @@ 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 ;
update tmp_studien3 set kz_rueck_beur_ein_tsg = ( select val ( astat )
from cifx where key = 400
and apnr = tmp_studien3 . statustyp_tsg
) ;
drop table tmp_studien2 ;
@ -475,6 +480,7 @@ st_studium_nr,
@@ -475,6 +480,7 @@ st_studium_nr,
endedat ,
stufrm ,
kz_rueck_beur_ein ,
kz_rueck_beur_ein_tsg ,
hzb_art ,
po_stp_stp_version_kb ,
summe
@ -514,6 +520,7 @@ select st_studium_nr,
@@ -514,6 +520,7 @@ select st_studium_nr,
else null : : date end ) as endedat ,
studienform_statistik_code as stufrm ,
kz_rueck_beur_ein ,
kz_rueck_beur_ein_tsg ,
hzb_art ,
po_stp_stp_version_kb ,
1 as summe
@ -546,6 +553,7 @@ st_studium_nr,
@@ -546,6 +553,7 @@ st_studium_nr,
endedat ,
stufrm ,
kz_rueck_beur_ein ,
kz_rueck_beur_ein_tsg ,
hzb_art ,
po_stp_stp_version_kb ,
summe
@ -586,6 +594,7 @@ cast (NULL as int) as studiengang_nr2,
@@ -586,6 +594,7 @@ cast (NULL as int) as studiengang_nr2,
else null : : date end ) as endedat ,
studienform_statistik_code as stufrm ,
kz_rueck_beur_ein ,
kz_rueck_beur_ein_tsg ,
hzb_art ,
po_stp_stp_version_kb ,
1 as summe