@ -63,7 +63,7 @@ null::integer as hzb_jahr,
null : : date as hzb_datum ,
null : : date as hzb_datum ,
null : : decimal ( 14 , 7 ) as hzb_note ,
null : : decimal ( 14 , 7 ) as hzb_note ,
null : : char ( 10 ) as abm_art_s ,
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 , SA . studienstatustyp desc ) as status_historie
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
- - 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
into temp tmp_studien
FROM costage_st_studierendenstammdaten S ,
FROM costage_st_studierendenstammdaten S ,
@ -88,11 +88,8 @@ and (SA.studienstatustyp not in ('Z','X') or (
and SA . gueltig_ab < = today ( )
and SA . gueltig_ab < = today ( )
and date ( SA . gueltig_ab ) < date ( SM . semester_ende )
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
) ) - - 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
< #if COSTAGE_STUDIENSTATUS_FILTER?exists>
- - and SA . studienstatustyp not in ( ' a ' , ' o ' )
and $ { COSTAGE_STUDIENSTATUS_FILTER }
- - group by 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13
< #else>
and SA . studienstatustyp not in ( ' a ' , ' o ' , ' z ' )
< / #if>
and $ { COSTAGE_STUDENT_FILTER }
and $ { COSTAGE_STUDENT_FILTER }
and SM . semester_tid > = $ { beginn_semester }
and SM . semester_tid > = $ { beginn_semester }
;
;
@ -429,7 +426,6 @@ null::timestamp as beginn_datum,
null : : timestamp AS gueltig_ab ,
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 ,
null : : integer as st_studium_nr_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 . praxissemester ) as praxissemester ,
@ -439,7 +435,7 @@ 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 , 37 , 38
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,8 +445,7 @@ abm_art_s=S.abm_art_s,
abm_art_s_msg = S . abm_art_s_msg ,
abm_art_s_msg = S . abm_art_s_msg ,
beginn_datum = S . beginn_datum ,
beginn_datum = S . beginn_datum ,
gueltig_ab = S . gueltig_ab ,
gueltig_ab = S . gueltig_ab ,
st_studienstatus_nr = S . st_studienstatus_nr ,
st_studienstatus_nr = S . st_studienstatus_nr
st_studium_nr_msg = S . st_studium_nr_msg
from tmp_studien_tsg S
from tmp_studien_tsg S
where S . st_studiengang_nr = tmp_studien_msg_tsg_fehlend2 . st_studiengang_nr_tsg
where S . st_studiengang_nr = tmp_studien_msg_tsg_fehlend2 . st_studiengang_nr_tsg
and S . st_studstamm_nr = tmp_studien_msg_tsg_fehlend2 . st_studstamm_nr
and S . st_studstamm_nr = tmp_studien_msg_tsg_fehlend2 . st_studstamm_nr
@ -508,8 +503,7 @@ praxissemester,
klinsem ,
klinsem ,
studienfach_sortierung ,
studienfach_sortierung ,
letztes_tsg_semester ,
letztes_tsg_semester ,
primaerflag_studien_msg ,
primaerflag_studien_msg
st_studium_nr_msg
)
)
select distinct semester ,
select distinct semester ,
semester_anfang ,
semester_anfang ,
@ -552,8 +546,7 @@ praxissemester,
klinsem ,
klinsem ,
studienfach_sortierung ,
studienfach_sortierung ,
letztes_tsg_semester ,
letztes_tsg_semester ,
primaerflag_studien_msg ,
primaerflag_studien_msg
st_studium_nr_msg
from tmp_studien_msg_tsg_fehlend2 F , costage_st_studiengaenge G
from tmp_studien_msg_tsg_fehlend2 F , costage_st_studiengaenge G
where G . st_studiengang_nr = F . st_studiengang_nr_msg
where G . st_studiengang_nr = F . st_studiengang_nr_msg
;
;
@ -604,7 +597,6 @@ studiengangs_identifikator,
studiengangs_bezeichnung ,
studiengangs_bezeichnung ,
st_sem_nr ,
st_sem_nr ,
st_studium_nr ,
st_studium_nr ,
st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
studienstatustyp ,
studienstatustyp ,
st_studienstatus_nr ,
st_studienstatus_nr ,
@ -814,7 +806,6 @@ studiengangs_identifikator,
studiengangs_bezeichnung ,
studiengangs_bezeichnung ,
st_sem_nr ,
st_sem_nr ,
T . st_studium_nr ,
T . st_studium_nr ,
T . st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
studienstatustyp ,
studienstatustyp ,
st_studienstatus_nr ,
st_studienstatus_nr ,
@ -862,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 ;
@ -893,7 +884,6 @@ create index ix_tmp_studien2 on tmp_studien3(kz_rueck_beur_ein)
;
;
insert into costage_st_studien_aggr (
insert into costage_st_studien_aggr (
st_studium_nr ,
st_studium_nr ,
st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
matrikelnummer ,
matrikelnummer ,
st_studiengang_nr ,
st_studiengang_nr ,
@ -934,7 +924,6 @@ st_studium_nr_msg,
)
)
select st_studium_nr ,
select st_studium_nr ,
st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
matrikelnummer ,
matrikelnummer ,
st_studiengang_nr ,
st_studiengang_nr ,
@ -995,7 +984,6 @@ st_studium_nr_msg,
-- from above to accomodate ranking in studiengangNummer field
-- from above to accomodate ranking in studiengangNummer field
insert into costage_st_studien_aggr (
insert into costage_st_studien_aggr (
st_studium_nr ,
st_studium_nr ,
st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
matrikelnummer ,
matrikelnummer ,
st_studiengang_nr ,
st_studiengang_nr ,
@ -1036,7 +1024,6 @@ st_studium_nr_msg,
)
)
select st_studium_nr ,
select st_studium_nr ,
st_studium_nr_msg ,
st_studstamm_nr ,
st_studstamm_nr ,
matrikelnummer ,
matrikelnummer ,
st_studiengang_nr ,
st_studiengang_nr ,