Browse Source

View xcube_wohnort_staat um alle und unbekannt ergänzt

xcube0.1
Marlies Winterstein 2 years ago
parent
commit
7119ad857f
  1. 11
      src-modules/module/xcube/schluesseltabellen/create_views.sql

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

@ -3,9 +3,14 @@ create view xcube_wohnort_staat( @@ -3,9 +3,14 @@ create view xcube_wohnort_staat(
druck,
apnr,
parent) as
select 'alle'::varchar(255) as druck ,
'alle'::char(10) as apnr,
null as parent
from xdummy
union
select 'Deutschland'::varchar(255) as druck ,
'0'::char(10) as apnr,
null as parent
'alle' as parent
from xdummy
union select druck,
apnr,
@ -15,6 +20,8 @@ union select druck, @@ -15,6 +20,8 @@ union select druck,
'' || val(astat) as apnr ,
bund_apnr as parent
from cifx where key=11
union select 'Ausland' druck , '1' apnr, null 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, '' || astat::integer, bund_apnr from cifx where key=12 and apnr != 'D'
union
select 'unbekannt' druck, '-9999' apnr, 'alle' as parent from xdummy;

Loading…
Cancel
Save