Browse Source

Umbenennung hs_nr immer nur für Hauptstelle, ansonsten standort_nr, Änderung der Views auf nur Hauptstellen

master
Marlies Winterstein 6 months ago
parent
commit
915a793045
  1. 63
      src-modules/module/sxc/conf/sxc.xml
  2. 14
      src-modules/module/sxc/etl/it.nrw/sfmk/insert.sql
  3. 2
      src-modules/module/sxc/masken/47090_felderinfo.unl
  4. 2
      src-modules/module/sxc/masken/47090_maskeninfo.unl

63
src-modules/module/sxc/conf/sxc.xml

@ -43,8 +43,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[SXC]" />
<column name="standort_ort" type ="VARCHAR" size ="255" default ="" notnull ="false" /> <column name="standort_ort" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="hauptsitz" type ="CHAR" size ="1" default ="" notnull ="false" /> <column name="hauptsitz" type ="CHAR" size ="1" default ="" notnull ="false" />
<column name="standort_laufnummer" type ="INTEGER" size ="10" default ="" notnull ="false" /> <column name="standort_laufnummer" type ="INTEGER" size ="10" default ="" notnull ="false" />
<column name="standort_nr" type ="CHAR" size ="10" default ="" notnull ="false" />
<column name="hs_nr" type ="CHAR" size ="10" default ="" notnull ="false" /> <column name="hs_nr" type ="CHAR" size ="10" default ="" notnull ="false" />
<column name="hs_nr_hauptsitz" type ="CHAR" size ="10" default ="" notnull ="false" />
</columns> </columns>
<indexes></indexes> <indexes></indexes>
<primaryKeys><rs> <primaryKeys><rs>
@ -224,6 +224,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[SXC]" />
<column name="auspraegung_label_4" type ="VARCHAR" size ="255" default ="" notnull ="false" /> <column name="auspraegung_label_4" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="bil002__studierende__anzahl" type ="INTEGER" size ="10" default ="" notnull ="false" /> <column name="bil002__studierende__anzahl" type ="INTEGER" size ="10" default ="" notnull ="false" />
<column name="bil002__studierende__q" type ="VARCHAR" size ="255" default ="" notnull ="false" /> <column name="bil002__studierende__q" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="standort_nr" type ="CHAR" size ="10" default ="" notnull ="false" />
<column name="hs_nr" type ="CHAR" size ="10" default ="" notnull ="false" /> <column name="hs_nr" type ="CHAR" size ="10" default ="" notnull ="false" />
</columns> </columns>
<indexes></indexes> <indexes></indexes>
@ -282,6 +283,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[SXC]" />
<column name="regelstudienzeit" type ="INTEGER" size ="255" default ="" notnull ="false" /> <column name="regelstudienzeit" type ="INTEGER" size ="255" default ="" notnull ="false" />
<column name="lehreinheit" type ="VARCHAR" size ="255" default ="" notnull ="false" /> <column name="lehreinheit" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="studienfach_hochschule_name" type ="VARCHAR" size ="255" default ="" notnull ="false" /> <column name="studienfach_hochschule_name" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="standort_nr" type ="CHAR" size ="10" default ="" notnull ="false" />
</columns> </columns>
<indexes></indexes> <indexes></indexes>
<primaryKeys><rs> <primaryKeys><rs>
@ -325,14 +327,9 @@ select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallin
union select bezeichnung, laufnummer::char(10), '0'::char(10) as parent, 1 as ebene from sxc_hsk_hochschultypen union select bezeichnung, laufnummer::char(10), '0'::char(10) as parent, 1 as ebene from sxc_hsk_hochschultypen
--Element kann sich nicht selbst als parent haben!! --Element kann sich nicht selbst als parent haben!!
--die Einzelhochschulen --die Einzelhochschulen
union select name, hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent, 2::smallint as ebene from sxc_hochschulen where union select name, hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent,
hs_nr is not null and hsk_laufnummer not in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1') 2::smallint as ebene from sxc_hochschulen where
union select name, 'ST_'||hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent, 2::smallint as ebene from sxc_hochschulen where hs_nr is not null;
hs_nr is not null and hsk_laufnummer in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1')
--und die Standorte
union select trim(name)|| ' Standort '||standort_ort, hs_nr::char(10), 'ST_'||hs_nr_hauptsitz as parent, 3::smallint as ebene from sxc_hochschulen_standorte
where hs_nr_hauptsitz is not null and hs_nr is not null;
]]></sql> ]]></sql>
</view> </view>
<view name="sxc_hochschulen_bland"> <view name="sxc_hochschulen_bland">
@ -344,15 +341,8 @@ where hs_nr_hauptsitz is not null and hs_nr is not null;
<sql dbsystem=""><![CDATA[ <sql dbsystem=""><![CDATA[
select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy
union select hsk_bundesland, substring(hsk_bundesland, 1,10), '0'::char(10) as parent, 1 as ebene from sxc_hochschulen union select hsk_bundesland, substring(hsk_bundesland, 1,10), '0'::char(10) as parent, 1 as ebene from sxc_hochschulen
--Element kann sich nicht selbst als parent haben!!
--die Einzelhochschulen
union select name, hs_nr::char(10), substring(hsk_bundesland, 1,10) as parent, 2::smallint as ebene from sxc_hochschulen where union select name, hs_nr::char(10), substring(hsk_bundesland, 1,10) as parent, 2::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer not in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1') hs_nr is not null ;
union select name, 'ST_'||hs_nr::char(10), substring(hsk_bundesland, 1,10) as parent, 2::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1')
--und die Standorte
union select trim(name)|| ' Standort '||standort_ort, hs_nr::char(10), 'ST_'||hs_nr_hauptsitz as parent, 3::smallint as ebene from sxc_hochschulen_standorte
where hs_nr_hauptsitz is not null and hs_nr is not null;
]]></sql> ]]></sql>
</view> </view>
<view name="sxc_hochschulen_liste"> <view name="sxc_hochschulen_liste">
@ -365,13 +355,7 @@ where hs_nr_hauptsitz is not null and hs_nr is not null;
select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy
union union
select name, hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where select name, hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer not in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1') hs_nr is not null ;
union
select name, 'ST_'||hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1')
--und die Standorte
union select trim(name)|| ' Standort '||standort_ort, hs_nr::char(10), 'ST_'||hs_nr_hauptsitz as parent, 1::smallint as ebene from sxc_hochschulen_standorte
where hs_nr_hauptsitz is not null and hs_nr is not null;
]]></sql> ]]></sql>
</view> </view>
<view name="sxc_hochschulen_nrw_art"> <view name="sxc_hochschulen_nrw_art">
@ -383,44 +367,25 @@ where hs_nr_hauptsitz is not null and hs_nr is not null;
<sql dbsystem=""><![CDATA[ <sql dbsystem=""><![CDATA[
select 'Hochschulen in NRW', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy select 'Hochschulen in NRW', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy
union select bezeichnung, laufnummer::char(10), '0'::char(10) as parent, 1 as ebene from sxc_hsk_hochschultypen union select bezeichnung, laufnummer::char(10), '0'::char(10) as parent, 1 as ebene from sxc_hsk_hochschultypen
--Element kann sich nicht selbst als parent haben!!
--die Einzelhochschulen
union select name, hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent, union select name, hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent,
2::smallint as ebene from sxc_hochschulen where 2::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer not in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1') hs_nr is not null
and hsk_bundesland='Nordrhein-Westfalen' and hsk_bundesland='Nordrhein-Westfalen';
union select name, 'ST_'||hs_nr::char(10), (select laufnummer from sxc_hsk_hochschultypen H where H.bezeichnung=sxc_hochschulen.hsk_art)::char(10) as parent, 2::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1')
and hsk_bundesland='Nordrhein-Westfalen'
--und die Standorte
union select trim(name)|| ' Standort '||standort_ort, hs_nr::char(10), 'ST_'||hs_nr_hauptsitz as parent, 3::smallint as ebene from sxc_hochschulen_standorte
where hs_nr_hauptsitz is not null and hs_nr is not null
and hs_nr_hauptsitz in (select hs_nr from sxc_hochschulen where hsk_bundesland='Nordrhein-Westfalen')
;
]]></sql> ]]></sql>
</view> </view>
<view name="sxc_hochschulen_nrw_art"> <view name="sxc_hochschulen_nrw_liste">
<columns><column name="druck" type ="CHAR" size ="2147483647" default ="" notnull ="false" /> <columns><column name="druck" type ="CHAR" size ="2147483647" default ="" notnull ="false" />
<column name="apnr" type ="INTEGER" size ="10" default ="" notnull ="false" /> <column name="apnr" type ="INTEGER" size ="10" default ="" notnull ="false" />
<column name="parent" type ="INTEGER" size ="10" default ="" notnull ="false" /> <column name="parent" type ="INTEGER" size ="10" default ="" notnull ="false" />
<column name="ebene" type ="INTEGER" size ="10" default ="" notnull ="false" /> <column name="ebene" type ="INTEGER" size ="10" default ="" notnull ="false" />
</columns> </columns>
<sql dbsystem=""><![CDATA[ <sql dbsystem=""><![CDATA[
create view sxc_hochschulen_nrw_liste (druck, apnr, parent, ebene) as
select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy select 'Hochschulen', 0::char(10) as hs_nr, null::char(10) as parent, 0::smallint as ebene from xdummy
union union
select name, hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where select name, hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer not in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1') hs_nr is not null
and hsk_bundesland='Nordrhein-Westfalen' and hsk_bundesland='Nordrhein-Westfalen';
union
select name, 'ST_'||hs_nr::char(10), '0'::char(10) as parent, 1::smallint as ebene from sxc_hochschulen where
hs_nr is not null and hsk_laufnummer in (select hsk_laufnummer from sxc_hochschulen_standorte where hauptsitz='1')
and hsk_bundesland='Nordrhein-Westfalen'
--und die Standorte
union select trim(name)|| ' Standort '||standort_ort, hs_nr::char(10), 'ST_'||hs_nr_hauptsitz as parent, 1::smallint as ebene from sxc_hochschulen_standorte
where hs_nr_hauptsitz is not null and hs_nr is not null
and hs_nr_hauptsitz in (select hs_nr from sxc_hochschulen where hsk_bundesland='Nordrhein-Westfalen')
;
]]></sql> ]]></sql>
</view> </view>
</views> </views>

14
src-modules/module/sxc/etl/it.nrw/sfmk/insert.sql

@ -1,7 +1,7 @@
truncate table sxc_itnrw_sfmk; truncate table sxc_itnrw_sfmk;
insert into sxc_itnrw_sfmk( insert into sxc_itnrw_sfmk(
hs_nr, standort_nr,
hochschulstandort, hochschulstandort,
gueltig_ab_semester, gueltig_ab_semester,
gueltig_bis_semester, gueltig_bis_semester,
@ -41,13 +41,17 @@ from sxc_itnrw_sfmk_neu
-- update sxc_itnrw_sfmk set hs_nr=substring(hs_nr from 2 for 10) -- update sxc_itnrw_sfmk set hs_nr=substring(hs_nr from 2 for 10)
-- where hs_nr like '0%'; -- where hs_nr like '0%';
update sxc_itnrw_sfmk set hs_nr=(select K.hs_nr_kenn update sxc_itnrw_sfmk set standort_nr=(select K.hs_nr_kenn
from sxc_trans_hs_nr K from sxc_trans_hs_nr K
where K.hs_nr_sourcesystem=sxc_itnrw_sfmk.hs_nr) where K.hs_nr_sourcesystem=sxc_itnrw_sfmk.standort_nr)
where exists (select K.hs_nr_kenn where exists (select K.hs_nr_kenn
from sxc_trans_hs_nr K from sxc_trans_hs_nr K
where K.hs_nr_sourcesystem=sxc_itnrw_sfmk.hs_nr); where K.hs_nr_sourcesystem=sxc_itnrw_sfmk.standort_nr);
update sxc_itnrw_sfmk set hs_nr= standort_nr;
update sxc_itnrw_sfmk set hs_nr= (select hs_nr from sxc_hochschulen_standorte where standort_nr= sxc_itnrw_sfmk.standort_nr)
where standort_nr in (select standort_nr from sxc_hochschulen_standorte where hauptsitz is not null);
update sxc_itnrw_sfmk set gueltig_ab_semester=19001 update sxc_itnrw_sfmk set gueltig_ab_semester=19001
where gueltig_ab_semester is null; where gueltig_ab_semester is null;

2
src-modules/module/sxc/masken/47090_felderinfo.unl

@ -3,6 +3,6 @@
47092^Abschluss^40^0^0^100^200^5^char^30^0^1^<<SQL>> select astat, dtxt from kenn_abschl_astat where struktur_c='Abschluss (amtlich)' order by 2;^^^ 47092^Abschluss^40^0^0^100^200^5^char^30^0^1^<<SQL>> select astat, dtxt from kenn_abschl_astat where struktur_c='Abschluss (amtlich)' order by 2;^^^
47093^Hochschulart^15^0^0^170^200^1^integer^30^0^1^<<SQL>> select laufnummer,bezeichnung from sxc_hsk_hochschultypen order by 1^ ^ ^ 47093^Hochschulart^15^0^0^170^200^1^integer^30^0^1^<<SQL>> select laufnummer,bezeichnung from sxc_hsk_hochschultypen order by 1^ ^ ^
47094^Stichwort^60^0^0^170^100^1^char^30^0^0^^^ ^ 47094^Stichwort^60^0^0^170^100^1^char^30^0^0^^^ ^
47095^Standort^20^0^0^170^100^1^char^30^0^1^<<SQL>> select hs_nr, trim(name) || ' Standort ' || standort_ort from sxc_hochschulen_standorte where 1=1 /* and hs_nr_hauptsitz in <@printkeys Hochschule.allNeededKeysList/> --<<Hochschule>> */ order by 2;^^ ^ 47095^Standort^20^0^0^170^100^1^char^30^0^1^<<SQL>> select standort_nr, trim(name) || ' Standort ' || standort_ort from sxc_hochschulen_standorte where 1=1 /* and hs_nr in <@printkeys Hochschule.allNeededKeysList/> --<<Hochschule>> */ order by 2;^^ ^
47096^Trägerschaft^17^0^0^170^200^1^integer^30^0^1^<<SQL>> select laufnummer,bezeichnung from sxc_hsk_traegerschaftstypen order by 1^ ^ ^ 47096^Trägerschaft^17^0^0^170^200^1^integer^30^0^1^<<SQL>> select laufnummer,bezeichnung from sxc_hsk_traegerschaftstypen order by 1^ ^ ^
47097^Fächer^30^0^0^100^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='KENN-Fächer-Sicht' order by sortnr,name;^^^ 47097^Fächer^30^0^0^100^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='KENN-Fächer-Sicht' order by sortnr,name;^^^

2
src-modules/module/sxc/masken/47090_maskeninfo.unl

@ -45,7 +45,7 @@ where HSK.hsnr=H.hsk_laufnummer\
and HSK.traegerschaft= T.bezeichnung\ and HSK.traegerschaft= T.bezeichnung\
and T.laufnummer=<<Trägerschaft>> ) */ \ and T.laufnummer=<<Trägerschaft>> ) */ \
\ \
/* and hs_nr in (<<Standort>>) */\ /* and standort_nr in (<<Standort>>) */\
group by 1,2,3,4,5,6\ group by 1,2,3,4,5,6\
order by 1,2,3,4,5,6\ order by 1,2,3,4,5,6\
;^XIL List\ ;^XIL List\

Loading…
Cancel
Save