|
|
|
@ -57,7 +57,8 @@ null::integer as pnr,
@@ -57,7 +57,8 @@ null::integer as pnr,
|
|
|
|
|
null::integer as leistung_nr_msg, |
|
|
|
|
null::integer as st_studiengang_nr_msg, |
|
|
|
|
null::date as leistungsdatum_msg, |
|
|
|
|
null::integer as semester_msg |
|
|
|
|
null::integer as semester_msg, |
|
|
|
|
null::char(10) as po_stp_stp_version_kb |
|
|
|
|
into temp tmp_pruef |
|
|
|
|
FROM costage_st_semester E, costage_leistungen_typen T, costage_leistungen L, costage_st_studierendenstammdaten S |
|
|
|
|
where E.semester_id=L.veranstaltung_semester |
|
|
|
@ -149,6 +150,15 @@ from costage_st_studien S
@@ -149,6 +150,15 @@ from costage_st_studien S
|
|
|
|
|
where S.st_studium_nr=tmp_pruef.st_studium_nr |
|
|
|
|
and S.st_studstamm_nr=tmp_pruef.st_studstamm_nr |
|
|
|
|
; |
|
|
|
|
--Fachsemester bei TSAB aus Sem. des Prüfungsdatums holen: |
|
|
|
|
update tmp_pruef set |
|
|
|
|
fachsemester = S.fachsemester |
|
|
|
|
from costage_st_studien_aggr S |
|
|
|
|
where S.semester=tmp_pruef.semester |
|
|
|
|
and S.st_studium_nr=tmp_pruef.st_studium_nr |
|
|
|
|
and S.matrikelnummer=tmp_pruef.matrikelnummer |
|
|
|
|
and tmp_pruef.leistungsdetailtyp_kb='TSAB' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
--Prüfung kann nach letztem eingeschr. Semester sein, daher zuerst letztes Sem. ermitteln: |
|
|
|
|
select S.st_studium_nr, |
|
|
|
@ -168,11 +178,12 @@ group by 1,2
@@ -168,11 +178,12 @@ group by 1,2
|
|
|
|
|
--Dann Studium vom letzten Semester in den Prüfungs-Datensatz schreiben: |
|
|
|
|
update tmp_pruef set |
|
|
|
|
st_studienstatus_nr=S.st_studienstatus_nr, |
|
|
|
|
fachsemester = S.fachsemester, |
|
|
|
|
--fachsemester = S.fachsemester, --wird oben ermittelt, ab 0.6 nicht mehr aus letztem Studiums-Semester |
|
|
|
|
studiengang_nr=S.studiengang_nr, |
|
|
|
|
fach_nr=S.fach_nr, |
|
|
|
|
unikey=S.unikey, |
|
|
|
|
st_studiengang_nr_msg=S.st_studiengang_nr_msg |
|
|
|
|
st_studiengang_nr_msg=S.st_studiengang_nr_msg, |
|
|
|
|
po_stp_stp_version_kb=S.po_stp_stp_version_kb |
|
|
|
|
from tmp_max_sem M, costage_st_studien_aggr S |
|
|
|
|
where S.matrikelnummer=M.matrikelnummer |
|
|
|
|
and S.st_studium_nr=M.st_studium_nr |
|
|
|
@ -213,6 +224,24 @@ leistungsdatum_msg=leistungsdatum,
@@ -213,6 +224,24 @@ leistungsdatum_msg=leistungsdatum,
|
|
|
|
|
semester_msg=semester |
|
|
|
|
where tmp_pruef.leistungsdetailtyp_kb !='TSAB' |
|
|
|
|
; |
|
|
|
|
--Fachsemester bei MSG gibt es in CO nicht. Daher die Regel: |
|
|
|
|
--die Fachsemesterzahl sollte die höchste FS-Zahl aus allen TSG enthalten: |
|
|
|
|
select matrikelnummer,st_studiengang_nr_msg,max(semester) as semester_max,max(fachsemester) as fachsem_max |
|
|
|
|
into temp tmp_fachsem_msg |
|
|
|
|
from tmp_pruef |
|
|
|
|
where leistungsdetailtyp_kb='TSAB' |
|
|
|
|
and st_studiengang_nr_msg is not null |
|
|
|
|
group by 1,2; |
|
|
|
|
|
|
|
|
|
update tmp_pruef set fachsemester=T.fachsem_max |
|
|
|
|
from tmp_fachsem_msg T |
|
|
|
|
where T.matrikelnummer=tmp_pruef.matrikelnummer |
|
|
|
|
and T.st_studiengang_nr_msg=tmp_pruef.st_studiengang_nr |
|
|
|
|
and T.semester_max <=tmp_pruef.semester |
|
|
|
|
and tmp_pruef.leistungsdetailtyp_kb='BAKN' |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
drop table tmp_fachsem_msg; |
|
|
|
|
|
|
|
|
|
--unikey setzen, wenn noch nicht vorhanden (z.B. bei MSG): |
|
|
|
|
update tmp_pruef set unikey=K.unikey |
|
|
|
@ -222,6 +251,8 @@ and K.st_skz_nr=G.st_skz_nr
@@ -222,6 +251,8 @@ and K.st_skz_nr=G.st_skz_nr
|
|
|
|
|
and tmp_pruef.unikey is null |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
delete from costage_st_pruef_aggr |
|
|
|
|
where semester >= ${beginn_semester}; |
|
|
|
|
|
|
|
|
@ -243,6 +274,7 @@ insert into costage_st_pruef_aggr(st_studium_nr,
@@ -243,6 +274,7 @@ insert into costage_st_pruef_aggr(st_studium_nr,
|
|
|
|
|
pnr, |
|
|
|
|
abschnitt, |
|
|
|
|
stp_sp_nr, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
note, |
|
|
|
|
credits, |
|
|
|
|
leistungsdatum, |
|
|
|
@ -272,6 +304,7 @@ select
@@ -272,6 +304,7 @@ select
|
|
|
|
|
pnr, |
|
|
|
|
abschnitt, |
|
|
|
|
stp_sp_nr, |
|
|
|
|
po_stp_stp_version_kb, |
|
|
|
|
case when pv_notenskala_typ_kb in ('DE1','DE2','DE3','DE4','DE5','DE6','DE7') or pv_notenskala_typ_kb is null then note_zahl else null::float end as note, |
|
|
|
|
credits, |
|
|
|
|
leistungsdatum, |
|
|
|
@ -283,7 +316,7 @@ select
@@ -283,7 +316,7 @@ select
|
|
|
|
|
semester_msg, |
|
|
|
|
count(*) |
|
|
|
|
from tmp_pruef |
|
|
|
|
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,24,25,26,27; |
|
|
|
|
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,24,25,26,27,28; |
|
|
|
|
|
|
|
|
|
drop table tmp_pruef; |
|
|
|
|
drop table tmp_pruef2; |
|
|
|
|