Browse Source

View Wohnort robuster gegen Eintraege ohne astat Schluessel

xcube0.1
Meikel Bisping 1 year ago
parent
commit
7109e1e99d
  1. 3
      src-modules/module/xcube/conf/xcube.xml
  2. 3
      src-modules/module/xcube/schluesseltabellen/create_views.sql

3
src-modules/module/xcube/conf/xcube.xml

@ -119,7 +119,8 @@ bund_apnr as parent
from cifx where key=11 from cifx where key=11
union select 'Ausland' druck , '1' apnr, 'alle' as parent from xdummy union select 'Ausland' druck , '1' apnr, 'alle' as parent from xdummy
union select druck,apnr,'1' from cifx where key=747 and parent is not null union select druck,apnr,'1' from cifx where key=747 and parent is not null
union select druck, '' || astat::integer, bund_apnr from cifx where key=12 and apnr != 'D' union select druck, case when astat='' or astat is null then apnr else astat end ,
case when bund_apnr='' or bund_apnr='---' or bund_apnr is null then '-9999' else bund_apnr end from cifx where key=12 and apnr != 'D'
union union
select 'unbekannt' druck, '-9999' apnr, 'alle' as parent from xdummy; select 'unbekannt' druck, '-9999' apnr, 'alle' as parent from xdummy;
]]></sql> ]]></sql>

3
src-modules/module/xcube/schluesseltabellen/create_views.sql

@ -22,7 +22,8 @@ bund_apnr as parent
from cifx where key=11 from cifx where key=11
union select 'Ausland' druck , '1' apnr, 'alle' as parent from xdummy union select 'Ausland' druck , '1' apnr, 'alle' as parent from xdummy
union select druck,apnr,'1' from cifx where key=747 and parent is not null union select druck,apnr,'1' from cifx where key=747 and parent is not null
union select druck, '' || astat::integer, bund_apnr from cifx where key=12 and apnr != 'D' union select druck, case when astat='' or astat is null then apnr else astat end ,
case when bund_apnr='' or bund_apnr='---' or bund_apnr is null then '-9999' else bund_apnr end from cifx where key=12 and apnr != 'D'
union union
select 'unbekannt' druck, '-9999' apnr, 'alle' as parent from xdummy; select 'unbekannt' druck, '-9999' apnr, 'alle' as parent from xdummy;

Loading…
Cancel
Save