Browse Source

Added primaerflag in dense rank of fach_Nr logic --order by clause

COStage_0.2_Release
apandey 3 years ago
parent
commit
2d2ad9eed3
  1. 4
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

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

@ -252,7 +252,7 @@ select st_studium_nr,
(case when primaerflag =1 then 1 (case when primaerflag =1 then 1
else else
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr
order by fach_nr) order by primaerflag desc,fach_nr)
end) as fach_nr, end) as fach_nr,
unikey, unikey,
beginn_datum as anfdat, beginn_datum as anfdat,
@ -314,7 +314,7 @@ cast (NULL as int) as studiengang_nr2,
(case when primaerflag =1 then 1 (case when primaerflag =1 then 1
else else
dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr dense_rank () over (partition by semester, st_studstamm_nr,studiengang_nr
order by fach_nr) order by primaerflag desc, fach_nr)
end) as fach_nr, end) as fach_nr,
unikey, unikey,
beginn_datum as anfdat, beginn_datum as anfdat,

Loading…
Cancel
Save