Browse Source

Generierung bei Status Z korrigiert #16

basisressourcen
Daniel Quathamer 9 months ago
parent
commit
09ec4c4026
  1. 15
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

15
src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

@ -367,8 +367,9 @@ select 80,timestamp_str(now()) from xdummy; @@ -367,8 +367,9 @@ select 80,timestamp_str(now()) from xdummy;
select T.st_studiengang_nr as st_studiengang_nr_tsg,
T.st_studstamm_nr,
null::integer as st_studiengang_nr_msg_end,
--M.st_studiengang_nr_msg as st_studiengang_nr_msg_end,
min(ST.semester) as startsemester,max(ST.semester) as endsemester
min(ST.semester) as startsemester,
max(ST.semester) as endsemester_msg,
max(T.semester) as endsemester_tsg
into temp tmp_studien_msg_tsg
from
tmp_studien2 T, costage_st_studiengaenge_mtsg M, tmp_studien ST --costage_st_studien ST
@ -390,7 +391,7 @@ from costage_st_studiengaenge_mtsg M, tmp_studien ST @@ -390,7 +391,7 @@ from costage_st_studiengaenge_mtsg M, tmp_studien ST
where ST.st_studiengang_nr=M.st_studiengang_nr_msg
and M.st_studiengang_nr_tsg=tmp_studien_msg_tsg.st_studiengang_nr_tsg
and ST.st_studstamm_nr=tmp_studien_msg_tsg.st_studstamm_nr
and ST.semester = tmp_studien_msg_tsg.endsemester
and ST.semester = tmp_studien_msg_tsg.endsemester_msg
and ST.studiengangs_typ_kb ='MSG'
and ST.studienstatustyp in ('U','B','E','I','X','Z') --nur tatsächlich eingeschrieben
and ST.status_historie=1
@ -406,9 +407,11 @@ S.semester_ende, @@ -406,9 +407,11 @@ S.semester_ende,
S.st_sem_nr,
T.st_studstamm_nr,
T.st_studiengang_nr_tsg,
T.st_studiengang_nr_msg_end
T.st_studiengang_nr_msg_end,
T.endsemester_tsg
into temp tmp_studien_msg_tsg_fehlend
from costage_st_semester S inner join tmp_studien_msg_tsg T on (S.semester_tid between T.startsemester and T.endsemester) --enthält alle möglichen TSG
from costage_st_semester S inner join tmp_studien_msg_tsg T on
(S.semester_tid between T.startsemester and T.endsemester_msg) --enthält alle möglichen TSG
left outer join tmp_studien2 T2 --enthält die tatsächlich vorhandenen TSG
on (T2.st_studiengang_nr=T.st_studiengang_nr_tsg
and T2.st_studstamm_nr=T.st_studstamm_nr
@ -468,7 +471,7 @@ into temp tmp_studien_msg_tsg_fehlend2 @@ -468,7 +471,7 @@ into temp tmp_studien_msg_tsg_fehlend2
from tmp_studien_msg_tsg_fehlend F, tmp_studien2 T
where F.st_studstamm_nr=T.st_studstamm_nr
and F.st_studiengang_nr_tsg=T.st_studiengang_nr_tsg
and T.abm_art_s is not null
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
;

Loading…
Cancel
Save