Browse Source

Computation of studiengang_nr refined again #1

COStage_0.2_Release
Daniel Quathamer 3 years ago
parent
commit
495a904cee
  1. 14
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

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

@ -234,8 +234,8 @@ select st_studium_nr, @@ -234,8 +234,8 @@ select st_studium_nr,
(case when primaerflag =1
then 1
else
(case when st_studiengang_nr_msg in (select distinct T1.st_studiengang_nr_msg from tmp_studien2 T1, temp_tmp_studien2 T2
where T1.matrikelnummer = T2.matrikelnummer and T1.st_studiengang_nr_msg = T2.st_studiengang_nr_msg and T1.semester = T2.Semester)
(case when st_studiengang_nr_msg in (select distinct T2.st_studiengang_nr_msg from temp_tmp_studien2 T2
where tmp_studien2.matrikelnummer = T2.matrikelnummer and tmp_studien2.semester = T2.Semester)
then 1
else
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr order by(case when studiengangs_typ_kb='TSG' then st_absz_nr else st_studium_nr end ))+1
@ -244,16 +244,12 @@ select st_studium_nr, @@ -244,16 +244,12 @@ select st_studium_nr,
(case when primaerflag =1
then 1
else
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr
order by(case when studiengangs_typ_kb='TSG'
then st_absz_nr
else st_studium_nr end ))+1
end)
end ) as studiengang_nr,
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr order by(case when studiengangs_typ_kb='TSG' then st_absz_nr else st_studium_nr end ))+1
end) end ) as studiengang_nr2,
(case when primaerflag =1 then 1
else
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr
order by fach_nr)+1
order by fach_nr)
end) as fach_nr,
unikey,
beginn_datum as anfdat,

Loading…
Cancel
Save