Marlies Winterstein
2 years ago
1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||||
|
drop view if exists xcube_wohnort_staat; |
||||||
|
create view xcube_wohnort_staat( |
||||||
|
druck, |
||||||
|
apnr, |
||||||
|
parent) as |
||||||
|
select 'Deutschland'::varchar(255) as druck , |
||||||
|
'0'::char(10) as apnr, |
||||||
|
null as parent |
||||||
|
from xdummy |
||||||
|
union select druck, |
||||||
|
apnr, |
||||||
|
'0' as parent |
||||||
|
from cifx where key=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 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' |
Loading…
Reference in new issue