Browse Source

Bugfix führende 0en Fächer #7

master
Daniel Quathamer 6 months ago
parent
commit
6f343fef53
  1. 10
      src-modules/module/qa/hilfstabellen/qa_sos_stg_aggr_astat_fuellen.sql
  2. 4
      src-modules/module/qa/hilfstabellen/qa_sos_stg_aggr_int_fuellen.sql

10
src-modules/module/qa/hilfstabellen/qa_sos_stg_aggr_astat_fuellen.sql

@ -5,9 +5,9 @@
select sp_table_exists('sos_stg_aggr') from xdummy select sp_table_exists('sos_stg_aggr') from xdummy
</sqlvar> </sqlvar>
<sqlvar name="qa_tablecomp_profile_is_active"><![CDATA[ <sqlvar name="qa_tablecomp_profile_is_active"><![CDATA[
select 1 from xdummy where 0 < (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat' and is_active=1) select 1 from xdummy where 0 < (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat_stg_abschluss_s1' and is_active=1)
union union
select 0 from xdummy where 0 = (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat' and is_active=1) select 0 from xdummy where 0 = (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat_stg_abschluss_s1' and is_active=1)
]]></sqlvar> ]]></sqlvar>
</sqlvars> </sqlvars>
@ -270,8 +270,6 @@ group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
</#foreach> </#foreach>
update tmp_stg_aggr_astat set stg='0' || stg
where length(trim(stg))=3;
delete from qa_sos_stg_aggr_astat delete from qa_sos_stg_aggr_astat
where sem_rueck_beur_ein in (select distinct K.sem_rueck_beur_ein where sem_rueck_beur_ein in (select distinct K.sem_rueck_beur_ein
@ -346,9 +344,7 @@ insert into qa_sos_stg_aggr_astat(hs_nr,
from tmp_stg_aggr_astat from tmp_stg_aggr_astat
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,24,25,26,27,28,29,30 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,24,25,26,27,28,29,30
; ;
update qa_sos_stg_aggr_astat set stg='0'||stg where length(stg)=3
and substring(stg from 1 for 1) in ('0','1','2','3','4','5','6','7','8','9')
;
drop table tmp_stg_aggr_astat; drop table tmp_stg_aggr_astat;

4
src-modules/module/qa/hilfstabellen/qa_sos_stg_aggr_int_fuellen.sql

@ -5,9 +5,9 @@
select sp_table_exists('sos_stg_aggr') from xdummy select sp_table_exists('sos_stg_aggr') from xdummy
</sqlvar> </sqlvar>
<sqlvar name="qa_tablecomp_profile_is_active"><![CDATA[ <sqlvar name="qa_tablecomp_profile_is_active"><![CDATA[
select 1 from xdummy where 0 < (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat' and is_active=1) select 1 from xdummy where 0 < (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat_stg_abschluss_s1' and is_active=1)
union union
select 0 from xdummy where 0 = (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat' and is_active=1) select 0 from xdummy where 0 = (select count(*) from qa_tablecomp_profile P where P.uniquename='sos_stud_astat_stg_abschluss_s1' and is_active=1)
]]></sqlvar> ]]></sqlvar>
</sqlvars> </sqlvars>

Loading…
Cancel
Save