|
|
@ -3,6 +3,7 @@ CREATE temp TABLE tmp_rpta_column\ |
|
|
|
(\ |
|
|
|
(\ |
|
|
|
uniquename varchar(255) NOT NULL,\ |
|
|
|
uniquename varchar(255) NOT NULL,\ |
|
|
|
caption varchar(255),\ |
|
|
|
caption varchar(255),\ |
|
|
|
|
|
|
|
caption_in_ergebnistabelle varchar(255),\ |
|
|
|
srcfieldname varchar(255),\ |
|
|
|
srcfieldname varchar(255),\ |
|
|
|
targetfieldname varchar(255),\ |
|
|
|
targetfieldname varchar(255),\ |
|
|
|
column_type integer,\ |
|
|
|
column_type integer,\ |
|
|
@ -13,6 +14,7 @@ CREATE temp TABLE tmp_rpta_column\ |
|
|
|
resultset_id integer,\ |
|
|
|
resultset_id integer,\ |
|
|
|
sortnr integer,\ |
|
|
|
sortnr integer,\ |
|
|
|
description TEXT,\ |
|
|
|
description TEXT,\ |
|
|
|
|
|
|
|
description_in_ergebnistabelle TEXT,\ |
|
|
|
format_code_uniquename varchar(255),\ |
|
|
|
format_code_uniquename varchar(255),\ |
|
|
|
format_code_id integer\ |
|
|
|
format_code_id integer\ |
|
|
|
);\ |
|
|
|
);\ |
|
|
@ -56,6 +58,7 @@ INSERT INTO tmp_rpta_column\ |
|
|
|
(resultset_id,\ |
|
|
|
(resultset_id,\ |
|
|
|
uniquename,\ |
|
|
|
uniquename,\ |
|
|
|
caption,\ |
|
|
|
caption,\ |
|
|
|
|
|
|
|
caption_in_ergebnistabelle,\ |
|
|
|
srcfieldname,\ |
|
|
|
srcfieldname,\ |
|
|
|
targetfieldname,\ |
|
|
|
targetfieldname,\ |
|
|
|
column_type,\ |
|
|
|
column_type,\ |
|
|
@ -65,11 +68,21 @@ INSERT INTO tmp_rpta_column\ |
|
|
|
is_aggregate,\ |
|
|
|
is_aggregate,\ |
|
|
|
sortnr,\ |
|
|
|
sortnr,\ |
|
|
|
description,\ |
|
|
|
description,\ |
|
|
|
|
|
|
|
description_in_ergebnistabelle,\ |
|
|
|
format_code_uniquename\ |
|
|
|
format_code_uniquename\ |
|
|
|
)\ |
|
|
|
)\ |
|
|
|
select R.tid,\ |
|
|
|
select R.tid,\ |
|
|
|
'${column.uniquename}',\ |
|
|
|
'${column.uniquename}',\ |
|
|
|
|
|
|
|
<#if column.caption?exists>\ |
|
|
|
'${column.caption}',\ |
|
|
|
'${column.caption}',\ |
|
|
|
|
|
|
|
<#else>\ |
|
|
|
|
|
|
|
'${column.caption_der_spalte}',\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
|
|
|
|
<#if column.caption_in_ergebnistabelle?exists>\ |
|
|
|
|
|
|
|
'${column.caption_in_ergebnistabelle}',\ |
|
|
|
|
|
|
|
<#else>\ |
|
|
|
|
|
|
|
'${column.caption}',\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
'${column.srcfieldname}',\ |
|
|
|
'${column.srcfieldname}',\ |
|
|
|
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,\ |
|
|
|
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,\ |
|
|
|
T.tid as column_type,\ |
|
|
|
T.tid as column_type,\ |
|
|
@ -78,7 +91,8 @@ ${column.is_visible},\ |
|
|
|
${column.visible_size},\ |
|
|
|
${column.visible_size},\ |
|
|
|
${column.is_aggregate},\ |
|
|
|
${column.is_aggregate},\ |
|
|
|
${sortnr*10},\ |
|
|
|
${sortnr*10},\ |
|
|
|
<#if column.description?exists>'${column.description}'<#else>null::varchar </#if>,\ |
|
|
|
<#if column.description?exists>'${column.description}'<#elseif column.description_der_spalte?exists>'${column.description_der_spalte}'<#else>null::varchar </#if>,\ |
|
|
|
|
|
|
|
<#if column.description_in_ergebnistabelle?exists>'${column.description_in_ergebnistabelle}'<#elseif column.description?exists>'${column.description}'<#else>null::varchar </#if>,\ |
|
|
|
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if>\ |
|
|
|
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if>\ |
|
|
|
FROM rpta_resultset R, rpta_column_type T\ |
|
|
|
FROM rpta_resultset R, rpta_column_type T\ |
|
|
|
where R.uniquename='${rpta_column_layout.rpta_resultset}'\ |
|
|
|
where R.uniquename='${rpta_column_layout.rpta_resultset}'\ |
|
|
@ -224,8 +238,8 @@ select C.tid as column_id,\ |
|
|
|
T.sortnr,\ |
|
|
|
T.sortnr,\ |
|
|
|
T.is_visible,\ |
|
|
|
T.is_visible,\ |
|
|
|
T.visible_size,\ |
|
|
|
T.visible_size,\ |
|
|
|
T.caption,\ |
|
|
|
T.caption_in_ergebnistabelle,\ |
|
|
|
T.description,\ |
|
|
|
T.description_in_ergebnistabelle,\ |
|
|
|
T.format_code_id\ |
|
|
|
T.format_code_id\ |
|
|
|
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T\ |
|
|
|
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T\ |
|
|
|
where C.uniquename=T.uniquename\ |
|
|
|
where C.uniquename=T.uniquename\ |
|
|
|