Browse Source

Definition Alterssichten

xcube0.1
Marlies Winterstein 1 year ago
parent
commit
e7816b6ec2
  1. 42
      src-modules/module/xcube/schluesseltabellen/xcube_dims_install.sql

42
src-modules/module/xcube/schluesseltabellen/xcube_dims_install.sql

@ -106,7 +106,49 @@ values @@ -106,7 +106,49 @@ values
('alter1', 'b95', 'gesamt','66 Jahre','$1::numeric(14,2)>=66.00 and $1::numeric(14,2)<67.00',96),
('alter1', 'b96', 'gesamt','67 Jahre','$1::numeric(14,2)>=67.00 and $1::numeric(14,2)<68.00',97),
('alter1', 'b99', 'gesamt','>=68 Jahre','$1::numeric(14,2)>=68.00',100);
<#list 16..17 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b2', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 18..20 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b3', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 21..24 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b4', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 25..29 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b5', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 30..39 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b6', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 40..49 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b7', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 50..54 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b8', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 55..60 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b9', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
delete from xcube_dims where id='alter3';
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
values
('alter3','gesamt',null,'alle','1=1',1);
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1) values
<#list 16..67 as i>
('alter3', ${i}::char(10), 'gesamt', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i}),
</#list>
('alter3', '68', 'gesamt','68 Jahre','$1::numeric(14,2)>=68.00',100);
<#if TableFieldExists('sos_stg_aggr','ch27_grund_beurl')>
delete from xcube_dims where id='ch27_grund_beurl';

Loading…
Cancel
Save