|
|
|
@ -11,17 +11,20 @@ select R.uniquename\
@@ -11,17 +11,20 @@ select R.uniquename\
|
|
|
|
|
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
|
|
|
</sqlvar>\ |
|
|
|
|
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
|
|
|
SELECT distinct name,\ |
|
|
|
|
0::smallint as is_virtual,\ |
|
|
|
|
SELECT distinct T.name,\ |
|
|
|
|
R.is_virtual,\ |
|
|
|
|
name as runtime_tablename\ |
|
|
|
|
from sx_tables\ |
|
|
|
|
where name in ('${my_base_rs}')\ |
|
|
|
|
and 0=(select count(*) from rpta_resultset R where R.uniquename='${my_base_rs}')\ |
|
|
|
|
from sx_tables T, rpta_resultset R \ |
|
|
|
|
where T.name=R.uniquename\ |
|
|
|
|
and T.name='${my_base_rs}'\ |
|
|
|
|
and R.is_virtual=0\ |
|
|
|
|
\ |
|
|
|
|
union\ |
|
|
|
|
select R.uniquename,\ |
|
|
|
|
1::smallint as is_virtual,\ |
|
|
|
|
R.is_virtual,\ |
|
|
|
|
'tmp_' || R.uniquename as runtime_tablename\ |
|
|
|
|
from rpta_resultset R where R.uniquename='${my_base_rs}'\ |
|
|
|
|
and R.is_virtual=1\ |
|
|
|
|
;\ |
|
|
|
|
]]>\ |
|
|
|
|
</sqlvar>\ |
|
|
|
@ -39,7 +42,8 @@ select caption,\
@@ -39,7 +42,8 @@ select caption,\
|
|
|
|
|
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
|
|
|
select L.uniquename,\ |
|
|
|
|
L.caption,\ |
|
|
|
|
L.whereclause\ |
|
|
|
|
L.whereclause,\ |
|
|
|
|
R.is_virtual\ |
|
|
|
|
from rpta_resultset R, rpta_column_layout L\ |
|
|
|
|
where L.resultset_id=R.tid\ |
|
|
|
|
and R.uniquename='${basetable.name}'\ |
|
|
|
@ -157,9 +161,14 @@ null::decimal(19,6) as ${column.targetfieldname},\
@@ -157,9 +161,14 @@ null::decimal(19,6) as ${column.targetfieldname},\
|
|
|
|
|
null::char(1) as dummycol\ |
|
|
|
|
into temp tmp_stud\ |
|
|
|
|
from ${basetable.runtime_tablename}\ |
|
|
|
|
where 1=1\ |
|
|
|
|
<#if rpta_column_layout.whereclause !="">\ |
|
|
|
|
where ${rpta_column_layout.whereclause}\ |
|
|
|
|
and ${rpta_column_layout.whereclause}\ |
|
|
|
|
</#if>\ |
|
|
|
|
<#if rpta_column_layout.is_virtual ==0>\ |
|
|
|
|
and ${filter}\ |
|
|
|
|
</#if>\ |
|
|
|
|
\ |
|
|
|
|
;\ |
|
|
|
|
\ |
|
|
|
|
\ |
|
|
|
|