|
|
@ -41,7 +41,9 @@ null::integer as st_studiengang_nr_msg_primaerflag, |
|
|
|
--null::integer as studienfach_sortierung, |
|
|
|
--null::integer as studienfach_sortierung, |
|
|
|
null::char(10) as hrst, |
|
|
|
null::char(10) as hrst, |
|
|
|
null::integer as fachsemester, |
|
|
|
null::integer as fachsemester, |
|
|
|
|
|
|
|
null::integer as praxissemester, |
|
|
|
null::integer as hssem, |
|
|
|
null::integer as hssem, |
|
|
|
|
|
|
|
null::integer as klinsem, |
|
|
|
(case when SG.studiengangs_typ_kb in ('TSG') then SA.studienstatustyp else null::char(10) end) as statustyp_tsg, |
|
|
|
(case when SG.studiengangs_typ_kb in ('TSG') then SA.studienstatustyp else null::char(10) end) as statustyp_tsg, |
|
|
|
(case when ST.hauptstudium_flag='J' then 1::smallint else 0::smallint end) as primaerflag_studien, |
|
|
|
(case when ST.hauptstudium_flag='J' then 1::smallint else 0::smallint end) as primaerflag_studien, |
|
|
|
0::smallint as tsg_generated, |
|
|
|
0::smallint as tsg_generated, |
|
|
@ -145,7 +147,8 @@ drop table if exists tmp_studien_esg_tsg; |
|
|
|
select *, |
|
|
|
select *, |
|
|
|
1::integer as primaerflag, |
|
|
|
1::integer as primaerflag, |
|
|
|
null::integer as letztes_tsg_semester, |
|
|
|
null::integer as letztes_tsg_semester, |
|
|
|
null::integer as st_studium_nr_msg |
|
|
|
null::integer as st_studium_nr_msg, |
|
|
|
|
|
|
|
null::date as endedat_tsg |
|
|
|
into temp tmp_studien_esg_tsg from tmp_studien T |
|
|
|
into temp tmp_studien_esg_tsg from tmp_studien T |
|
|
|
where T.studiengangs_typ_kb in ('ESG','TSG') |
|
|
|
where T.studiengangs_typ_kb in ('ESG','TSG') |
|
|
|
and T.status_historie=1 |
|
|
|
and T.status_historie=1 |
|
|
@ -205,6 +208,30 @@ and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr |
|
|
|
and F.fachsemestertyp='FS' |
|
|
|
and F.fachsemestertyp='FS' |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 35,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--praxissemester: |
|
|
|
|
|
|
|
update tmp_studien_esg_tsg |
|
|
|
|
|
|
|
set praxissemester=F.fachsemester |
|
|
|
|
|
|
|
from costage_st_fachsemester F |
|
|
|
|
|
|
|
where F.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr |
|
|
|
|
|
|
|
and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr |
|
|
|
|
|
|
|
and F.fachsemestertyp='PS' |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 36,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--klinsem |
|
|
|
|
|
|
|
update tmp_studien_esg_tsg |
|
|
|
|
|
|
|
set klinsem=F.fachsemester |
|
|
|
|
|
|
|
from costage_st_fachsemester F |
|
|
|
|
|
|
|
where F.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr |
|
|
|
|
|
|
|
and F.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr |
|
|
|
|
|
|
|
and F.fachsemestertyp='KS' |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
select 40,timestamp_str(now()) from xdummy; |
|
|
|
select 40,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
update tmp_studien_esg_tsg |
|
|
|
update tmp_studien_esg_tsg |
|
|
@ -236,6 +263,27 @@ and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung |
|
|
|
and A.bezug='S' |
|
|
|
and A.bezug='S' |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 55,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--Endedatum bei TSG nachladen bei Abmeldungen: |
|
|
|
|
|
|
|
update tmp_studien_esg_tsg set endedat_tsg=SA.gueltig_ab |
|
|
|
|
|
|
|
from costage_st_studienstatus SA |
|
|
|
|
|
|
|
where SA.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr |
|
|
|
|
|
|
|
and SA.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr |
|
|
|
|
|
|
|
and SA.studienstatustyp in ('Z','X') |
|
|
|
|
|
|
|
and tmp_studien_esg_tsg.abm_art_s is not null |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select 57,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update tmp_studien_esg_tsg set endedat=SA.gueltig_ab |
|
|
|
|
|
|
|
from costage_st_studienstatus SA |
|
|
|
|
|
|
|
where SA.st_studium_nr=tmp_studien_esg_tsg.st_studium_nr |
|
|
|
|
|
|
|
and SA.st_sem_nr=tmp_studien_esg_tsg.st_sem_nr |
|
|
|
|
|
|
|
and SA.studienstatustyp in ('Z','X') |
|
|
|
|
|
|
|
and tmp_studien_esg_tsg.studiengangs_typ_kb='ESG' |
|
|
|
|
|
|
|
and tmp_studien_esg_tsg.abm_art_s is not null |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
select 60,timestamp_str(now()) from xdummy; |
|
|
|
select 60,timestamp_str(now()) from xdummy; |
|
|
|
|
|
|
|
|
|
|
@ -379,13 +427,15 @@ null::timestamp AS gueltig_ab, |
|
|
|
null::integer as st_studienstatus_nr, |
|
|
|
null::integer as st_studienstatus_nr, |
|
|
|
null::integer as primaerflag_studien_msg, |
|
|
|
null::integer as primaerflag_studien_msg, |
|
|
|
max(T.semester) as letztes_tsg_semester, |
|
|
|
max(T.semester) as letztes_tsg_semester, |
|
|
|
max(T.fachsemester) as fachsemester |
|
|
|
max(T.fachsemester) as fachsemester, |
|
|
|
|
|
|
|
max(T.praxissemester) as praxissemester, |
|
|
|
|
|
|
|
max(T.klinsem) as klinsem |
|
|
|
into temp tmp_studien_msg_tsg_fehlend2 |
|
|
|
into temp tmp_studien_msg_tsg_fehlend2 |
|
|
|
from tmp_studien_msg_tsg_fehlend F, tmp_studien_tsg T |
|
|
|
from tmp_studien_msg_tsg_fehlend F, tmp_studien_tsg T |
|
|
|
where F.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
where F.st_studstamm_nr=T.st_studstamm_nr |
|
|
|
and F.st_studiengang_nr_tsg=T.st_studiengang_nr |
|
|
|
and F.st_studiengang_nr_tsg=T.st_studiengang_nr |
|
|
|
and T.semester=F.endsemester_tsg |
|
|
|
and T.semester=F.endsemester_tsg |
|
|
|
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 |
|
|
|
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 |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
update tmp_studien_msg_tsg_fehlend2 set |
|
|
|
update tmp_studien_msg_tsg_fehlend2 set |
|
|
@ -449,6 +499,8 @@ hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s_msg, |
|
|
|
abm_art_s_msg, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
studienfach_sortierung, |
|
|
|
studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
primaerflag_studien_msg |
|
|
|
primaerflag_studien_msg |
|
|
@ -490,6 +542,8 @@ hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s_msg, |
|
|
|
abm_art_s_msg, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
studienfach_sortierung, |
|
|
|
studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
primaerflag_studien_msg |
|
|
|
primaerflag_studien_msg |
|
|
@ -571,6 +625,8 @@ hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s_msg, |
|
|
|
abm_art_s_msg, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
studienfach_sortierung, |
|
|
|
studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
primaerflag_studien_msg, |
|
|
|
primaerflag_studien_msg, |
|
|
@ -578,7 +634,9 @@ primaerflag_studien_msg, |
|
|
|
null::integer as fach_nr, |
|
|
|
null::integer as fach_nr, |
|
|
|
null::integer as studiengang_nr, |
|
|
|
null::integer as studiengang_nr, |
|
|
|
null::char(10) as unikey, |
|
|
|
null::char(10) as unikey, |
|
|
|
null::integer as kz_rueck_beur_ein |
|
|
|
null::integer as kz_rueck_beur_ein, |
|
|
|
|
|
|
|
endedat, |
|
|
|
|
|
|
|
endedat_tsg |
|
|
|
into temp tmp_studien2 |
|
|
|
into temp tmp_studien2 |
|
|
|
from tmp_studien_tsg; |
|
|
|
from tmp_studien_tsg; |
|
|
|
|
|
|
|
|
|
|
@ -619,9 +677,12 @@ hzb_note, |
|
|
|
hzb_land_nr, |
|
|
|
hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
studienfach_sortierung, |
|
|
|
studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
studiengangs_typ_kb |
|
|
|
studiengangs_typ_kb, |
|
|
|
|
|
|
|
endedat |
|
|
|
) |
|
|
|
) |
|
|
|
select |
|
|
|
select |
|
|
|
semester, |
|
|
|
semester, |
|
|
@ -660,9 +721,12 @@ hzb_note, |
|
|
|
hzb_land_nr, |
|
|
|
hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
1::integer as studienfach_sortierung, |
|
|
|
1::integer as studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
studiengangs_typ_kb |
|
|
|
studiengangs_typ_kb, |
|
|
|
|
|
|
|
endedat |
|
|
|
from tmp_studien_esg_tsg E |
|
|
|
from tmp_studien_esg_tsg E |
|
|
|
where E.studiengangs_typ_kb='ESG'; |
|
|
|
where E.studiengangs_typ_kb='ESG'; |
|
|
|
|
|
|
|
|
|
|
@ -770,6 +834,8 @@ hzb_land_nr, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s, |
|
|
|
abm_art_s_msg, |
|
|
|
abm_art_s_msg, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
studienfach_sortierung, |
|
|
|
studienfach_sortierung, |
|
|
|
letztes_tsg_semester, |
|
|
|
letztes_tsg_semester, |
|
|
|
studiengangs_typ_kb, |
|
|
|
studiengangs_typ_kb, |
|
|
@ -777,6 +843,8 @@ fach_nr, |
|
|
|
studiengang_nr, |
|
|
|
studiengang_nr, |
|
|
|
unikey, |
|
|
|
unikey, |
|
|
|
kz_rueck_beur_ein, |
|
|
|
kz_rueck_beur_ein, |
|
|
|
|
|
|
|
endedat, |
|
|
|
|
|
|
|
endedat_tsg, |
|
|
|
null::char(10) as po_stp_stp_version_kb, |
|
|
|
null::char(10) as po_stp_stp_version_kb, |
|
|
|
null::integer as po_regelstudienzeit, |
|
|
|
null::integer as po_regelstudienzeit, |
|
|
|
null::integer as kz_rueck_beur_ein_tsg, |
|
|
|
null::integer as kz_rueck_beur_ein_tsg, |
|
|
@ -785,7 +853,7 @@ into temp tmp_studien3 |
|
|
|
from tmp_studien2 T left outer join costage_st_studien_spoversionen SPO |
|
|
|
from tmp_studien2 T left outer join costage_st_studien_spoversionen SPO |
|
|
|
on (SPO.st_studium_nr=T.st_studium_nr |
|
|
|
on (SPO.st_studium_nr=T.st_studium_nr |
|
|
|
and SPO.gueltig_ab < T.semester_ende) |
|
|
|
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,51,52 |
|
|
|
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,52 |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
select 160,timestamp_str(now()) from xdummy; |
|
|
|
select 160,timestamp_str(now()) from xdummy; |
|
|
@ -827,6 +895,8 @@ st_studium_nr, |
|
|
|
hrst, |
|
|
|
hrst, |
|
|
|
semester, |
|
|
|
semester, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
hssem, |
|
|
|
hssem, |
|
|
|
primaerflag, |
|
|
|
primaerflag, |
|
|
|
studiengang_nr, |
|
|
|
studiengang_nr, |
|
|
@ -865,6 +935,8 @@ select st_studium_nr, |
|
|
|
hrst, |
|
|
|
hrst, |
|
|
|
semester, |
|
|
|
semester, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
hssem, |
|
|
|
hssem, |
|
|
|
primaerflag, |
|
|
|
primaerflag, |
|
|
|
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt: |
|
|
|
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt: |
|
|
@ -883,9 +955,11 @@ select st_studium_nr, |
|
|
|
beginn_datum as anfdat, |
|
|
|
beginn_datum as anfdat, |
|
|
|
(case when studienstatustyp not in ('Z','X') then gueltig_ab |
|
|
|
(case when studienstatustyp not in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as ruebeudat, |
|
|
|
else null::date end) as ruebeudat, |
|
|
|
(case when studienstatustyp in ('Z','X') then gueltig_ab |
|
|
|
(case when endedat is not null then endedat |
|
|
|
|
|
|
|
when studienstatustyp in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as endedat, |
|
|
|
else null::date end) as endedat, |
|
|
|
(case when statustyp_tsg in ('Z','X') then gueltig_ab |
|
|
|
(case when endedat_tsg is not null then endedat_tsg |
|
|
|
|
|
|
|
when statustyp_tsg in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as endedat_tsg, |
|
|
|
else null::date end) as endedat_tsg, |
|
|
|
studienform_statistik_code as stufrm, |
|
|
|
studienform_statistik_code as stufrm, |
|
|
|
kz_rueck_beur_ein, |
|
|
|
kz_rueck_beur_ein, |
|
|
@ -921,6 +995,8 @@ st_studium_nr, |
|
|
|
hrst, |
|
|
|
hrst, |
|
|
|
semester, |
|
|
|
semester, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
hssem, |
|
|
|
hssem, |
|
|
|
primaerflag, |
|
|
|
primaerflag, |
|
|
|
studiengang_nr, |
|
|
|
studiengang_nr, |
|
|
@ -959,6 +1035,8 @@ select st_studium_nr, |
|
|
|
hrst, |
|
|
|
hrst, |
|
|
|
semester, |
|
|
|
semester, |
|
|
|
fachsemester, |
|
|
|
fachsemester, |
|
|
|
|
|
|
|
praxissemester, |
|
|
|
|
|
|
|
klinsem, |
|
|
|
hssem, |
|
|
|
hssem, |
|
|
|
primaerflag, |
|
|
|
primaerflag, |
|
|
|
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt: |
|
|
|
--Nun ist studiengang_nr=1 definiert. Die restlichen werden mit RANK ermittelt: |
|
|
@ -978,9 +1056,11 @@ cast (NULL as int) as studiengang_nr2, |
|
|
|
beginn_datum as anfdat, |
|
|
|
beginn_datum as anfdat, |
|
|
|
(case when studienstatustyp not in ('Z','X') then gueltig_ab |
|
|
|
(case when studienstatustyp not in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as ruebeudat, |
|
|
|
else null::date end) as ruebeudat, |
|
|
|
(case when studienstatustyp in ('Z','X') then gueltig_ab |
|
|
|
(case when endedat is not null then endedat |
|
|
|
|
|
|
|
when studienstatustyp in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as endedat, |
|
|
|
else null::date end) as endedat, |
|
|
|
(case when statustyp_tsg in ('Z','X') then gueltig_ab |
|
|
|
(case when endedat_tsg is not null then endedat_tsg |
|
|
|
|
|
|
|
when statustyp_tsg in ('Z','X') then gueltig_ab |
|
|
|
else null::date end) as endedat_tsg, |
|
|
|
else null::date end) as endedat_tsg, |
|
|
|
studienform_statistik_code as stufrm, |
|
|
|
studienform_statistik_code as stufrm, |
|
|
|
kz_rueck_beur_ein, |
|
|
|
kz_rueck_beur_ein, |
|
|
|