Browse Source

Anzahl gleichzeitiger Fächer #1

master
Daniel Quathamer 3 weeks ago
parent
commit
cf5037ed33
  1. 2
      src-modules/module/msg/conf/msg.xml
  2. 16
      src-modules/module/msg/hilfstabellen/msg_fkombi_aggr_fuellen.sql

2
src-modules/module/msg/conf/msg.xml

@ -23,6 +23,7 @@
<column name="alter" type ="DECIMAL" size ="(14,2)" default ="" notnull ="false" description="Alter in Jahren"/> <column name="alter" type ="DECIMAL" size ="(14,2)" default ="" notnull ="false" description="Alter in Jahren"/>
<column name="hzbart" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Art der HZB (gruppiert)"><comment>in 5 groben Kategorien: Allgem. HS-Reife, Fachgeb.HS-Reife etc.</comment></column> <column name="hzbart" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Art der HZB (gruppiert)"><comment>in 5 groben Kategorien: Allgem. HS-Reife, Fachgeb.HS-Reife etc.</comment></column>
<column name="hrst" type ="CHAR" size ="10" default ="" notnull ="false" description="Hörerstatus"/> <column name="hrst" type ="CHAR" size ="10" default ="" notnull ="false" description="Hörerstatus"/>
<column name="stufrm" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienform"/>
<column name="fach_sem_zahl" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Anzahl Fachsemester" /> <column name="fach_sem_zahl" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Anzahl Fachsemester" />
<column name="kz_rueck_beur_ein" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Rückmeldestatus" /> <column name="kz_rueck_beur_ein" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Rückmeldestatus" />
<column name="kombi_kennz" type ="CHAR" size ="10" default ="" notnull ="false" description="Kombinationskennz"><comment>Klassifizierung der Kombination</comment></column> <column name="kombi_kennz" type ="CHAR" size ="10" default ="" notnull ="false" description="Kombinationskennz"><comment>Klassifizierung der Kombination</comment></column>
@ -30,6 +31,7 @@
<column name="kombi_fach_nr" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Kombiniertes Fach Fach-Nr." /> <column name="kombi_fach_nr" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Kombiniertes Fach Fach-Nr." />
<column name="kombi_fach_sem_zahl" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Kombiniertes Fach Anzahl Fachsemester" /> <column name="kombi_fach_sem_zahl" type ="SMALLINT" size ="2" default ="" notnull ="true" description="Kombiniertes Fach Anzahl Fachsemester" />
<column name="kombi_ch30_fach" type ="CHAR" size ="10" default ="" notnull ="false" description="Kombiniertes Fach" /> <column name="kombi_ch30_fach" type ="CHAR" size ="10" default ="" notnull ="false" description="Kombiniertes Fach" />
<column name="kombi_anz" type ="SMALLINT" size ="10" default ="" notnull ="false" description="Kombinierte Fächer (Anzahl)"><comment>Im jew. Semester und Studiengang die Anzahl der kombinierten Fächer</comment></column>
<column name="summe" type ="DECIMAL" size ="(19,6)" default ="" notnull ="false" is_sum="true" description="Summe"/> <column name="summe" type ="DECIMAL" size ="(19,6)" default ="" notnull ="false" is_sum="true" description="Summe"/>
</columns> </columns>
<indexes> <indexes>

16
src-modules/module/msg/hilfstabellen/msg_fkombi_aggr_fuellen.sql

@ -14,6 +14,7 @@ geschlecht SMALLINT not null,
alter decimal(14,2) , alter decimal(14,2) ,
hzbart SMALLINT , hzbart SMALLINT ,
hrst CHAR(10) , hrst CHAR(10) ,
stufrm char(10),
fach_sem_zahl SMALLINT not null, fach_sem_zahl SMALLINT not null,
kz_rueck_beur_ein SMALLINT not null, kz_rueck_beur_ein SMALLINT not null,
kombi_kennz CHAR(10) , kombi_kennz CHAR(10) ,
@ -21,6 +22,7 @@ kombi_tid_stg_2 INTEGER ,
kombi_fach_nr SMALLINT , kombi_fach_nr SMALLINT ,
kombi_fach_sem_zahl SMALLINT , kombi_fach_sem_zahl SMALLINT ,
kombi_ch30_fach CHAR(10) , kombi_ch30_fach CHAR(10) ,
kombi_anz smallint,
summe decimal(19,6) summe decimal(19,6)
) )
; ;
@ -36,6 +38,7 @@ matrikel_nr,
alter, alter,
hzbart, hzbart,
hrst, hrst,
stufrm,
fach_sem_zahl, fach_sem_zahl,
kz_rueck_beur_ein, kz_rueck_beur_ein,
summe) summe)
@ -49,6 +52,7 @@ select matrikel_nr,
alter, alter,
hzbart, hzbart,
hrst, hrst,
stufrm,
fach_sem_zahl, fach_sem_zahl,
kz_rueck_beur_ein, kz_rueck_beur_ein,
summe summe
@ -73,6 +77,7 @@ insert into msg_fkombi_aggr
alter, alter,
hzbart, hzbart,
hrst, hrst,
stufrm,
fach_sem_zahl, fach_sem_zahl,
kz_rueck_beur_ein, kz_rueck_beur_ein,
kombi_kennz, kombi_kennz,
@ -92,6 +97,7 @@ T.geschlecht,
T.alter, T.alter,
T.hzbart, T.hzbart,
T.hrst, T.hrst,
T.stufrm,
T.fach_sem_zahl, T.fach_sem_zahl,
T.kz_rueck_beur_ein, T.kz_rueck_beur_ein,
''::varchar(10) as kombi_kennz, ''::varchar(10) as kombi_kennz,
@ -110,6 +116,16 @@ and T.sem_rueck_beur_ein=S.sem_rueck_beur_ein
--and T.fach_nr !=S.fach_nr --and T.fach_nr !=S.fach_nr
; ;
update msg_fkombi_aggr F set kombi_anz=(select count(*)
from sos_stg_aggr S, dim_studiengang D, sos_stichtag I
where S.stichtag=I.tid
and I.appl_key='0'
and D.tid=S.tid_stg
and S.matrikel_nr=F.matrikel_nr
and S.sem_rueck_beur_ein=F.sem_rueck_beur_ein
and S.studiengang_nr=F.studiengang_nr
);
--TODO: Hildesheim spezifisch: --TODO: Hildesheim spezifisch:
update msg_fkombi_aggr F set kombi_kennz='SPRACHE_F3' update msg_fkombi_aggr F set kombi_kennz='SPRACHE_F3'
where exists(select S.matrikel_nr where exists(select S.matrikel_nr

Loading…
Cancel
Save