|
|
|
@ -58,7 +58,9 @@ null::integer as hzb_land_sub_r_nr ,
@@ -58,7 +58,9 @@ null::integer as hzb_land_sub_r_nr ,
|
|
|
|
|
null::integer as hzb_jahr, |
|
|
|
|
null::date as hzb_datum , |
|
|
|
|
null::decimal(14,7) as hzb_note, |
|
|
|
|
rank () over (partition by SM.st_sem_nr, S.st_studstamm_nr, SG.studiengangs_identifikator order by (case when SA.gueltig_ab =SM.semester_ende then date_val('01.01.1900') else SA.gueltig_ab end) desc) as status_historie |
|
|
|
|
null::char(10) as abm_art_s, |
|
|
|
|
rank () over (partition by SM.st_sem_nr, S.st_studstamm_nr, SG.studiengangs_identifikator order by SA.gueltig_ab desc) as status_historie |
|
|
|
|
--rank () over (partition by SM.st_sem_nr, S.st_studstamm_nr, SG.studiengangs_identifikator order by (case when SA.gueltig_ab =SM.semester_ende then date_val('01.01.1900') else SA.gueltig_ab end) desc) as status_historie |
|
|
|
|
into temp tmp_studien |
|
|
|
|
FROM costage_st_studierendenstammdaten S, |
|
|
|
|
costage_st_studien ST, |
|
|
|
@ -77,19 +79,25 @@ and SG.studiengangs_typ_kb in ('ESG','TSG','MSG')
@@ -77,19 +79,25 @@ and SG.studiengangs_typ_kb in ('ESG','TSG','MSG')
|
|
|
|
|
and SA.st_studium_nr=ST.st_studium_nr |
|
|
|
|
and SA.st_sem_nr=SM.st_sem_nr |
|
|
|
|
and SA.gueltig_ab <=SM.semester_ende --nur letzter Status im jew. Semester interessiert, nicht danach |
|
|
|
|
and (SA.studienstatustyp not in ('Z','X') or (SA.studienstatustyp in ('Z','X') and SA.gueltig_ab <= today())) --Studis außer erst/neueinschr/rückmeld/beurlaubt werden in der Semestermitte exmatr. zum Endedatum Semesterende, wenn dieses Datum in der Zukunft liegt soll der Studi mit dem vorherigen Status erscheinen |
|
|
|
|
and (SA.studienstatustyp not in ('Z','X') or ( |
|
|
|
|
SA.studienstatustyp in ('Z','X') |
|
|
|
|
and SA.gueltig_ab <= today() |
|
|
|
|
and date(SA.gueltig_ab) < date(SM.semester_ende) |
|
|
|
|
)) --Studis außer erst/neueinschr/rückmeld/beurlaubt werden in der Semestermitte exmatr. zum Endedatum Semesterende, wenn dieses Datum in der Zukunft liegt soll der Studi mit dem vorherigen Status erscheinen |
|
|
|
|
--and SA.studienstatustyp not in ('a','o') |
|
|
|
|
and ${COSTAGE_STUDENT_FILTER} |
|
|
|
|
and SM.semester_tid >= ${beginn_semester} |
|
|
|
|
--group by 1,2,3,4,5,6,7,8,9,10,11,12,13 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 1,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
update tmp_studien |
|
|
|
|
set hrst=H.hoererstatus_kb |
|
|
|
|
from costage_st_hoererstatus H |
|
|
|
|
where tmp_studien.st_studstamm_nr = H.st_studstamm_nr |
|
|
|
|
and tmp_studien.st_sem_nr = H.st_sem_nr |
|
|
|
|
and hoererstatus_kb != 'E' --der Hörerstatus "E - Exmatrikuliert" gilt eigentlich erst zum Studienende, hat aber kein "gültig ab" Datum. Der Hörerstatus "E" kann ignoriert werden. |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -117,6 +125,21 @@ from costage_st_hzb H
@@ -117,6 +125,21 @@ from costage_st_hzb H
|
|
|
|
|
where tmp_studien.st_studstamm_nr = H.st_person_nr |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 10,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--Abmeldungsart studienbezogen: |
|
|
|
|
update tmp_studien set abm_art_s=P.st_abm_art_kurzbezeichnung |
|
|
|
|
from costage_st_personen_abmeldungen P, costage_st_semester S, costage_st_abmeldungsarten A |
|
|
|
|
where S.st_sem_nr=P.st_sem_nr |
|
|
|
|
and S.semester_tid=tmp_studien.semester |
|
|
|
|
and P.st_studium_nr=tmp_studien.st_studium_nr |
|
|
|
|
and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung |
|
|
|
|
and A.bezug='S' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 20,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create index tmp_ix1 on tmp_studien(st_studiengang_nr); |
|
|
|
|
create index tmp_ix2 on tmp_studien(st_studstamm_nr); |
|
|
|
@ -140,64 +163,95 @@ from tmp_studien T
@@ -140,64 +163,95 @@ from tmp_studien T
|
|
|
|
|
--2. Prio: aus costage_st_hauptstudien: |
|
|
|
|
insert into tmp_studien2 |
|
|
|
|
select T.*, |
|
|
|
|
1::integer as primaerflag, |
|
|
|
|
null::integer as letztes_tsg_semester |
|
|
|
|
from tmp_studien T, costage_st_hauptstudien H |
|
|
|
|
where H.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
|
and H.st_studium_nr=T.st_studium_nr |
|
|
|
|
and H.st_sem_nr=T.st_sem_nr |
|
|
|
|
and status_historie=1 |
|
|
|
|
and T.studiengangs_typ_kb in ('ESG','TSG') |
|
|
|
|
and T.primaerflag_studien=0 |
|
|
|
|
; |
|
|
|
|
--Studiengänge ohne Primärflag TODO langsam: |
|
|
|
|
insert into tmp_studien2 |
|
|
|
|
select T.*, |
|
|
|
|
0::integer as primaerflag, |
|
|
|
|
(case when H.st_studstamm_nr > 0 then 1::integer else 0::integer end) as primaerflag, |
|
|
|
|
null::integer as letztes_tsg_semester |
|
|
|
|
from tmp_studien T left outer join costage_st_hauptstudien H |
|
|
|
|
on (H.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
|
from tmp_studien T left outer join costage_st_hauptstudien H |
|
|
|
|
on ( H.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
|
and H.st_studium_nr=T.st_studium_nr |
|
|
|
|
and H.st_sem_nr=T.st_sem_nr) |
|
|
|
|
where T.status_historie=1 |
|
|
|
|
and T.studiengangs_typ_kb in ('ESG','TSG') |
|
|
|
|
and T.primaerflag_studien=0 |
|
|
|
|
and H.st_studstamm_nr is null |
|
|
|
|
; |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 30,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--Studiengänge ohne Primärflag TODO langsam: |
|
|
|
|
-- insert into tmp_studien2 |
|
|
|
|
-- select T.*, |
|
|
|
|
-- 0::integer as primaerflag, |
|
|
|
|
-- null::integer as letztes_tsg_semester |
|
|
|
|
-- from tmp_studien T left outer join costage_st_hauptstudien H |
|
|
|
|
-- on (H.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
|
-- and H.st_studium_nr=T.st_studium_nr |
|
|
|
|
-- and H.st_sem_nr=T.st_sem_nr) |
|
|
|
|
-- where T.status_historie=1 |
|
|
|
|
-- and T.studiengangs_typ_kb in ('ESG','TSG') |
|
|
|
|
-- and T.primaerflag_studien=0 |
|
|
|
|
-- and H.st_studstamm_nr is null |
|
|
|
|
-- ; |
|
|
|
|
|
|
|
|
|
select 40,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--Ermittlung msg bei TSG: |
|
|
|
|
--es kann pro Studi und Semester und Abschlussziel mehrere MSG geben, |
|
|
|
|
--daqher zuerst den jeweils letzten ermiteln. Dieser ist dann der Default-MSG: |
|
|
|
|
select st_sem_nr,st_absz_nr,st_studstamm_nr,max(beginn_datum) as beginn_datum |
|
|
|
|
--daqher zuerst den jeweils letzten ermitteln. Dieser ist dann der Default-MSG: |
|
|
|
|
select st_sem_nr, |
|
|
|
|
st_absz_nr, |
|
|
|
|
st_studstamm_nr, |
|
|
|
|
null::integer as st_studiengang_nr_msg, |
|
|
|
|
max(beginn_datum) as beginn_datum |
|
|
|
|
into temp tmp_last_msg_per_term |
|
|
|
|
from tmp_studien |
|
|
|
|
where studiengangs_typ_kb='MSG' |
|
|
|
|
group by 1,2,3 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
update tmp_last_msg_per_term set st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
|
from tmp_studien T |
|
|
|
|
where T.studiengangs_typ_kb='MSG' |
|
|
|
|
and T.st_absz_nr=tmp_last_msg_per_term.st_absz_nr |
|
|
|
|
and T.st_studiengang_nr_msg is not null |
|
|
|
|
and T.st_sem_nr=tmp_last_msg_per_term.st_sem_nr |
|
|
|
|
and T.st_studstamm_nr=tmp_last_msg_per_term.st_studstamm_nr |
|
|
|
|
and T.beginn_datum=tmp_last_msg_per_term.beginn_datum |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
--nur Diagnose Einzelschritt: |
|
|
|
|
--select st_studiengang_nr_msg,* from tmp_studien2 where semester=20222 |
|
|
|
|
--; |
|
|
|
|
|
|
|
|
|
--zuerst den jeweils letzten (=jüngsten) MSG zuweisen: |
|
|
|
|
--TODO: langsam: |
|
|
|
|
update tmp_studien2 set st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
|
from tmp_studien T,tmp_last_msg_per_term E, costage_st_studiengaenge_mtsg M |
|
|
|
|
where M.st_studiengang_nr_tsg=tmp_studien2.st_studiengang_nr |
|
|
|
|
and M.st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
|
and T.st_sem_nr=tmp_studien2.st_sem_nr |
|
|
|
|
and T.st_studstamm_nr=tmp_studien2.st_studstamm_nr |
|
|
|
|
and E.st_sem_nr=tmp_studien2.st_sem_nr |
|
|
|
|
update tmp_studien2 set st_studiengang_nr_msg=E.st_studiengang_nr_msg |
|
|
|
|
from tmp_last_msg_per_term E |
|
|
|
|
where E.st_sem_nr=tmp_studien2.st_sem_nr |
|
|
|
|
and E.st_studstamm_nr=tmp_studien2.st_studstamm_nr |
|
|
|
|
and E.st_absz_nr=tmp_studien2.st_absz_nr |
|
|
|
|
and E.beginn_datum=T.beginn_datum |
|
|
|
|
and T.studiengangs_typ_kb='MSG' |
|
|
|
|
and T.st_absz_nr=tmp_studien2.st_absz_nr |
|
|
|
|
and T.st_studiengang_nr_msg is not null |
|
|
|
|
and tmp_studien2.studiengangs_typ_kb ='TSG' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
-- |
|
|
|
|
-- update tmp_studien2 set st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
|
-- from tmp_studien T,tmp_last_msg_per_term E, costage_st_studiengaenge_mtsg M |
|
|
|
|
-- where M.st_studiengang_nr_tsg=tmp_studien2.st_studiengang_nr |
|
|
|
|
-- and M.st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
|
-- and T.st_sem_nr=tmp_studien2.st_sem_nr |
|
|
|
|
-- and T.st_studstamm_nr=tmp_studien2.st_studstamm_nr |
|
|
|
|
-- and E.st_sem_nr=tmp_studien2.st_sem_nr |
|
|
|
|
-- and E.st_studstamm_nr=tmp_studien2.st_studstamm_nr |
|
|
|
|
-- and E.st_absz_nr=tmp_studien2.st_absz_nr |
|
|
|
|
-- and E.beginn_datum=T.beginn_datum |
|
|
|
|
-- and T.studiengangs_typ_kb='MSG' |
|
|
|
|
-- and T.st_absz_nr=tmp_studien2.st_absz_nr |
|
|
|
|
-- and T.st_studiengang_nr_msg is not null |
|
|
|
|
-- and tmp_studien2.studiengangs_typ_kb ='TSG' |
|
|
|
|
-- ; |
|
|
|
|
|
|
|
|
|
select 50,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--wenn der jüngste MSG nicht paßt, wird der nächste passende |
|
|
|
|
--zugewiesen: |
|
|
|
|
update tmp_studien2 set st_studiengang_nr_msg=T.st_studiengang_nr_msg |
|
|
|
@ -214,6 +268,7 @@ and tmp_studien2.st_studiengang_nr_msg is null
@@ -214,6 +268,7 @@ and tmp_studien2.st_studiengang_nr_msg is null
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 60,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--statustyp bei TSG aus MSG nachladen: |
|
|
|
|
update tmp_studien2 set studienstatustyp=S.studienstatustyp |
|
|
|
@ -227,6 +282,8 @@ and S.status_historie=1
@@ -227,6 +282,8 @@ and S.status_historie=1
|
|
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 70,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
drop table tmp_last_msg_per_term; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -242,6 +299,8 @@ and M.st_studiengang_nr_tsg=T.st_studiengang_nr
@@ -242,6 +299,8 @@ and M.st_studiengang_nr_tsg=T.st_studiengang_nr
|
|
|
|
|
and T.studiengangs_typ_kb ='TSG' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 80,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--Start- und Endsemester aller MSG pro Student: |
|
|
|
|
drop table if exists tmp_studien_msg; |
|
|
|
@ -256,6 +315,10 @@ and T.studiengangs_typ_kb ='MSG'--enthält die MSG
@@ -256,6 +315,10 @@ and T.studiengangs_typ_kb ='MSG'--enthält die MSG
|
|
|
|
|
and T.status_historie=1 |
|
|
|
|
group by 1,2 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 90,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--Verknüpfung mit TSG über alle möglichen Semester: |
|
|
|
|
drop table if exists tmp_studien_msg_tsg; |
|
|
|
|
select distinct |
|
|
|
@ -276,6 +339,9 @@ and M.st_studstamm_nr=T.st_studstamm_nr
@@ -276,6 +339,9 @@ and M.st_studstamm_nr=T.st_studstamm_nr
|
|
|
|
|
and E.semester_tid between M.startsemester and M.endsemester |
|
|
|
|
and T.studiengangs_typ_kb ='TSG' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 100,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--nun fehlende Datensätze ermitteln: |
|
|
|
|
drop table if exists tmp_studien_msg_tsg_fehlend; |
|
|
|
|
select T.* |
|
|
|
@ -325,6 +391,7 @@ hzb_land_sub_r_nr ,
@@ -325,6 +391,7 @@ hzb_land_sub_r_nr ,
|
|
|
|
|
hzb_jahr, |
|
|
|
|
hzb_datum , |
|
|
|
|
hzb_note, |
|
|
|
|
abm_art_s, |
|
|
|
|
fachsemester, |
|
|
|
|
letztes_tsg_semester) |
|
|
|
|
select M.semester, |
|
|
|
@ -361,6 +428,7 @@ S.hzb_land_sub_r_nr ,
@@ -361,6 +428,7 @@ S.hzb_land_sub_r_nr ,
|
|
|
|
|
S.hzb_jahr, |
|
|
|
|
S.hzb_datum , |
|
|
|
|
S.hzb_note, |
|
|
|
|
null::char(10) as abm_art_s, |
|
|
|
|
null::integer as fachsemester, |
|
|
|
|
max(S.semester) |
|
|
|
|
from tmp_studien_msg_tsg_fehlend M, tmp_studien3 S --,costage_st_semester E |
|
|
|
@ -373,9 +441,11 @@ and M.semester != S.semester
@@ -373,9 +441,11 @@ 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,29,30,31 |
|
|
|
|
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 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 110,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--statustyp und hrst nachladen: |
|
|
|
|
update tmp_studien2 set studienstatustyp=S.studienstatustyp, |
|
|
|
|
hrst=S.hrst |
|
|
|
@ -386,24 +456,28 @@ and S.studiengangs_typ_kb ='MSG'
@@ -386,24 +456,28 @@ and S.studiengangs_typ_kb ='MSG'
|
|
|
|
|
and tmp_studien2.tsg_generated=1 |
|
|
|
|
and tmp_studien2.st_sem_nr=S.st_sem_nr |
|
|
|
|
--Defaultmäßig den letzten Status im Semester nehmen (status_historie=1) |
|
|
|
|
and S.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) |
|
|
|
|
) |
|
|
|
|
-- 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) |
|
|
|
|
-- ) |
|
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 120,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--statustyp_tsg nachladen: |
|
|
|
|
update tmp_studien2 set statustyp_tsg=S.statustyp_tsg, |
|
|
|
|
fachsemester=S.fachsemester |
|
|
|
|
update tmp_studien2 set statustyp_tsg='X' , -- generierte TSG sind immer geschlossen S.statustyp_tsg, |
|
|
|
|
fachsemester=S.fachsemester, |
|
|
|
|
abm_art_s=S.abm_art_s |
|
|
|
|
from tmp_studien S |
|
|
|
|
where tmp_studien2.st_studium_nr=S.st_studium_nr |
|
|
|
|
and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr |
|
|
|
@ -413,6 +487,8 @@ and tmp_studien2.letztes_tsg_semester=S.semester
@@ -413,6 +487,8 @@ and tmp_studien2.letztes_tsg_semester=S.semester
|
|
|
|
|
and S.status_historie=1 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 130,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
drop table tmp_studien_msg_tsg_fehlend; |
|
|
|
|
drop table tmp_studien_msg_tsg; |
|
|
|
|
drop table tmp_studien_msg; |
|
|
|
@ -435,6 +511,7 @@ and tmp_studien2.studiengangs_typ_kb ='TSG'
@@ -435,6 +511,7 @@ and tmp_studien2.studiengangs_typ_kb ='TSG'
|
|
|
|
|
update tmp_studien2 set fach_nr=1 |
|
|
|
|
where fach_nr is null; |
|
|
|
|
|
|
|
|
|
select 140,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update tmp_studien2 set unikey=K.unikey |
|
|
|
@ -483,6 +560,8 @@ and T.semester=tmp_studien2.semester
@@ -483,6 +560,8 @@ and T.semester=tmp_studien2.semester
|
|
|
|
|
and T.st_studiengang_nr_msg=tmp_studien2.st_studiengang_nr_msg |
|
|
|
|
) |
|
|
|
|
; |
|
|
|
|
select 150,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--SPO-Version (letzte im jew. Semester) ermitteln: |
|
|
|
|
select T.*,null::char(10) as po_stp_stp_version_kb, |
|
|
|
@ -492,9 +571,11 @@ into temp tmp_studien3
@@ -492,9 +571,11 @@ 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,42,43,44,45,46,47,48,49,50 |
|
|
|
|
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,43,44,45,46,47,48,49,50,51 |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 160,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
update tmp_studien3 set po_stp_stp_version_kb= SPO.po_stp_stp_version_kb, |
|
|
|
|
po_regelstudienzeit=SPO.po_regelstudienzeit |
|
|
|
|
from costage_st_studien_spoversionen SPO |
|
|
|
@ -506,6 +587,7 @@ from cifx where key=400
@@ -506,6 +587,7 @@ from cifx where key=400
|
|
|
|
|
and apnr=tmp_studien3.statustyp_tsg |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
select 170,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
drop table tmp_studien2; |
|
|
|
@ -548,6 +630,7 @@ st_studium_nr,
@@ -548,6 +630,7 @@ st_studium_nr,
|
|
|
|
|
hzb_jahr, |
|
|
|
|
hzb_datum, |
|
|
|
|
hzb_note, |
|
|
|
|
abm_art_s, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
po_regelstudienzeit, |
|
|
|
|
summe |
|
|
|
@ -594,6 +677,7 @@ select st_studium_nr,
@@ -594,6 +677,7 @@ select st_studium_nr,
|
|
|
|
|
hzb_jahr, |
|
|
|
|
hzb_datum, |
|
|
|
|
hzb_note, |
|
|
|
|
abm_art_s, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
po_regelstudienzeit, |
|
|
|
|
1 as summe |
|
|
|
@ -633,6 +717,7 @@ st_studium_nr,
@@ -633,6 +717,7 @@ st_studium_nr,
|
|
|
|
|
hzb_jahr, |
|
|
|
|
hzb_datum, |
|
|
|
|
hzb_note, |
|
|
|
|
abm_art_s, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
po_regelstudienzeit, |
|
|
|
|
summe |
|
|
|
@ -680,12 +765,14 @@ cast (NULL as int) as studiengang_nr2,
@@ -680,12 +765,14 @@ cast (NULL as int) as studiengang_nr2,
|
|
|
|
|
hzb_jahr, |
|
|
|
|
hzb_datum, |
|
|
|
|
hzb_note, |
|
|
|
|
abm_art_s, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
po_regelstudienzeit, |
|
|
|
|
1 as summe |
|
|
|
|
from tmp_studien3 |
|
|
|
|
where kz_rueck_beur_ein is null |
|
|
|
|
; |
|
|
|
|
select 180,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--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 |
|
|
|
@ -707,6 +794,7 @@ and S.studiengang_nr_min=1
@@ -707,6 +794,7 @@ and S.studiengang_nr_min=1
|
|
|
|
|
|
|
|
|
|
drop table tmp_studien_ohne_studiengangnr_1; |
|
|
|
|
|
|
|
|
|
select 190,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--HZB Data: |
|
|
|
|
|
|
|
|
@ -722,16 +810,8 @@ and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung
@@ -722,16 +810,8 @@ and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung
|
|
|
|
|
and A.bezug='P' |
|
|
|
|
and costage_st_studien_aggr.semester >= ${beginn_semester} |
|
|
|
|
; |
|
|
|
|
--dann studienbezogen: |
|
|
|
|
update costage_st_studien_aggr set abm_art_s=P.st_abm_art_kurzbezeichnung |
|
|
|
|
from costage_st_personen_abmeldungen P, costage_st_semester S, costage_st_abmeldungsarten A |
|
|
|
|
where S.st_sem_nr=P.st_sem_nr |
|
|
|
|
and S.semester_tid=costage_st_studien_aggr.semester |
|
|
|
|
and P.st_studium_nr=costage_st_studien_aggr.st_studium_nr |
|
|
|
|
and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung |
|
|
|
|
and A.bezug='S' |
|
|
|
|
and costage_st_studien_aggr.semester >= ${beginn_semester} |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 200,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
--Beurlaubungs-Art: |
|
|
|
|
|
|
|
|
@ -773,6 +853,9 @@ and A.st_adresse_typ='H'
@@ -773,6 +853,9 @@ and A.st_adresse_typ='H'
|
|
|
|
|
and costage_st_studien_aggr.semester >= ${beginn_semester} |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
select 300,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
drop table tmp_studien3; |
|
|
|
|
drop table tmp_primaer_msg; |
|
|
|
|
|
|
|
|
|