You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.9 KiB
84 lines
2.9 KiB
48110^Leistungen und Studiengänge^--Freemarker Template\ |
|
<#include "SQL_lingua_franca"/>\ |
|
<#include "SuperX_general"/>\ |
|
--\ |
|
--Autor D. Quathamer 2024\ |
|
<sqlvars>\ |
|
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
<#assign my_base_rs='rpta_exam_unit_dim_studiengang' />\ |
|
SELECT distinct name,\ |
|
0::smallint as 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}')\ |
|
union\ |
|
select R.uniquename,\ |
|
1::smallint as is_virtual,\ |
|
'tmp_' || R.uniquename as runtime_tablename\ |
|
from rpta_resultset R where R.uniquename='${my_base_rs}'\ |
|
;\ |
|
]]>\ |
|
</sqlvar>\ |
|
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
select * from rpta_resultset\ |
|
where uniquename='${basetable.name}';\ |
|
\ |
|
]]></sqlvar>\ |
|
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
SELECT * from sp_rpta_column_layout('${basetable.name}'::varchar(255),<<Spaltenlayout>>::varchar(255));\ |
|
\ |
|
]]></sqlvar>\ |
|
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
SELECT * from sp_rpta_columns_in_layout(<<Spaltenlayout>>::varchar(255))\ |
|
where 1=1\ |
|
/* and column_uniquename in (<<Spalten>>) */\ |
|
order by sortnr\ |
|
;\ |
|
]]></sqlvar>\ |
|
</sqlvars>\ |
|
\ |
|
<#assign filter="1=1\ |
|
/* and sem_der_pruefung >= <<Seit Semester>> */\ |
|
/* and sem_der_pruefung <= <<Bis Semester>> */\ |
|
/* and sem_der_pruefung = <<Semester>> */\ |
|
/* and substring('' || sem_der_pruefung from 5 for 1)='<<Semestertyp>>' */\ |
|
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
" />\ |
|
\ |
|
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
<#assign filter = filter + " and tid_stg in (select tid from lehr_stg_ab where stg in "+Fächer.allNeededKeysList +")"/> \ |
|
\ |
|
<#if columns?has_content>\ |
|
\ |
|
<#if basetable.is_virtual==1>\ |
|
\ |
|
create temp table ${basetable.runtime_tablename} as\ |
|
select ${rpta_resultset.fieldclause} \ |
|
from ${rpta_resultset.joinclause} \ |
|
where 1=1\ |
|
<#if rpta_resultset.whereclause != ""> \ |
|
${rpta_resultset.whereclause} </#if>\ |
|
and ${filter}\ |
|
;\ |
|
</#if>\ |
|
\ |
|
\ |
|
\ |
|
<@rpta_interpret_column_layout nonvirtualTableFilter=1/>\ |
|
\ |
|
\ |
|
</#if> --wenn columns?has_content^--Freemarker Template\ |
|
XIL List\ |
|
sizable_columns horizontal_scrolling\ |
|
drop_and_delete movable_columns \ |
|
white_space_color=COLOR_WHITE fixed_columns=1\ |
|
min_heading_height=55\ |
|
<#foreach column in columns>\ |
|
<#if column.is_visible!=0>\ |
|
Column CID=0 heading_text="${column.caption}" center_heading explanation="${column.description}"\ |
|
row_selectable heading_platform readonly\ |
|
width=${column.visible_width} text_size=60\ |
|
</#if>\ |
|
</#foreach>\ |
|
@@@^Studienfach^Anzahl bzw. Anteil^Leistungen und Studiengänge^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where uniquename=<<Spaltenlayout>>;^
|
|
|