diff --git a/src-modules/module/rpta/conf/rpta.xml b/src-modules/module/rpta/conf/rpta.xml index 6ee8f1c..cc4a4a0 100644 --- a/src-modules/module/rpta/conf/rpta.xml +++ b/src-modules/module/rpta/conf/rpta.xml @@ -523,7 +523,7 @@ scriptfile="" database=""/> - + @@ -572,7 +572,7 @@ scriptfile="" database=""/> - + diff --git a/src-modules/module/rpta/masken/48000_maskeninfo.unl b/src-modules/module/rpta/masken/48000_maskeninfo.unl index 2ab3808..e6bb60d 100644 --- a/src-modules/module/rpta/masken/48000_maskeninfo.unl +++ b/src-modules/module/rpta/masken/48000_maskeninfo.unl @@ -43,7 +43,8 @@ select caption,\ select L.uniquename,\ L.caption,\ L.whereclause,\ - R.is_virtual\ + R.is_virtual,\ + L.sortclause\ from rpta_resultset R, rpta_column_layout L\ where L.resultset_id=R.tid\ and R.uniquename='${basetable.name}'\ @@ -144,114 +145,7 @@ and ${filter}\ \ \ \ -\ -select \ ---zuerst die Basisdaten:\ -<#foreach column in columns>\ -<#if column.coltype="physicalColumn">\ -${column.srcfieldname},\ -<#elseif column.coltype="logicalColumn">\ -${column.colfunction} as ${column.targetfieldname},\ -<#elseif column.coltype="lookupColumn">\ -(${column.colfunction}) as ${column.targetfieldname},\ -<#elseif column.coltype="computedColumn">\ -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 !="">\ -and ${rpta_column_layout.whereclause}\ -\ -<#if rpta_column_layout.is_virtual ==0>\ -and ${filter}\ -\ -\ -;\ -\ -\ ---ergebnistabelle:\ -select \ ---zuerst die nicht-Aggregate:\ -<#assign groupby=0 />\ -<#foreach column in columns>\ -<#if column.is_aggregate==0>\ -<#assign groupby=groupby+1 />\ -${column.targetfieldname},\ -\ -\ ---dann die Aggregate:\ -<#foreach column in columns>\ -<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ -sum(${column.targetfieldname}) as ${column.targetfieldname},\ -\ -\ -null::char(1) as dummycol\ -into temp tmp_stud2\ -from tmp_stud\ -where 1=1\ -/* ${<>} */\ -group by\ -<#list 1..groupby as i>${i}\ -<#if i != groupby>\ -,\ -\ -\ -;\ ---für Prozentwerte alle Aggregate summieren:\ -select <#foreach column in columns>\ -<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ -sum(${column.targetfieldname})::float as ${column.targetfieldname},\ -\ -\ -null::char(1) as dummycol\ -into temp tmp_gesamt\ -from tmp_stud2\ -where 1=1\ -;\ -\ -<#assign number_of_visible_colums=0 />\ -<#foreach column in columns>\ -<#if column.is_visible!=0>\ -<#assign number_of_visible_colums=number_of_visible_colums+1 />\ -\ -\ -<#assign colnr=0 />\ -select \ -<#foreach column in columns>\ -<#if column.is_visible!=0>\ -<#assign colnr=colnr+1 />\ -<#assign format_sql="" />\ -<#if column.format_sql?string != "">\ -<#assign format_sql=column.format_sql />\ -\ -\ -<#if column.coltype=="computedColumn">\ -(${column.colfunction})${format_sql} as ${column.targetfieldname}\ -<#else>\ -${column.targetfieldname}${format_sql} as ${column.targetfieldname}\ -\ -\ -<#if colnr < number_of_visible_colums>,\ - --wenn sichtbar\ -\ -from tmp_stud2\ -order by <#list 1..number_of_visible_colums as i>${i}\ -<#if i != number_of_visible_colums>\ -,\ -\ -\ -;\ -<#if basetable.is_virtual==1>\ -drop table if exists ${basetable.runtime_tablename};\ -\ -\ -\ -drop table if exists tmp_stud;\ -drop table if exists tmp_gesamt;\ -\ +<@rpta_interpret_column_layout />\ \ --wenn columns?has_content^--Freemarker Template\ XIL List\ diff --git a/src-modules/module/rpta/masken/48110_felderinfo.unl b/src-modules/module/rpta/masken/48110_felderinfo.unl index dbacc7c..71135e5 100644 --- a/src-modules/module/rpta/masken/48110_felderinfo.unl +++ b/src-modules/module/rpta/masken/48110_felderinfo.unl @@ -23,8 +23,8 @@ union select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht 48122^Hörerstatus^200^330^-1^140^150^1^sql^30^0^999^<> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<> select apnr, eintrag from hoererstatus where eintrag='alle';^ 48128^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^999^<> select apnr, eintrag from koepfe_oder_faelle order by 2^apnr, eintrag^<> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ 48132^Geschlecht^110^0^0^140^80^1^integer^30^0^999^<> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ -48133^Spalten^3001^0^0^150^190^10^char^30^0^1^<>\ +48133^Spalten^3002^0^0^150^190^10^char^30^0^1^<>\ select C.uniquename, C.caption ,L.layout_id from rpta_column C, rpta_column2layout L where C.tid=L.column_id and layout_id in\ (select tid from rpta_column_layout where uniquename=<>) order by 2;^ ^ ^ -48134^tablestylesheet^19^0^0^100^150^1^char^200^1^1^<>\ -select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110^hidden^<>select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110 and ord=1^ +48134^tablestylesheet^3001^0^0^100^150^1^char^200^1^1^<>\ +select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110^ ^<>select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110 and ord=1^ diff --git a/src-modules/module/rpta/schluesseltabellen/fm_templates.unl b/src-modules/module/rpta/schluesseltabellen/fm_templates.unl index 4ee2baa..8f49b9d 100644 --- a/src-modules/module/rpta/schluesseltabellen/fm_templates.unl +++ b/src-modules/module/rpta/schluesseltabellen/fm_templates.unl @@ -1,4 +1,4 @@ -107^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ +116^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ CREATE temp TABLE tmp_rpta_column\ (\ uniquename varchar(255) NOT NULL,\ @@ -91,7 +91,7 @@ select R.tid,\ '${column.caption}',\ \ '${column.srcfieldname}',\ -<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' ,\ +<#if !column.targetfieldname?exists || column.targetfieldname=="">'${column.srcfieldname}' <#else>'${column.targetfieldname}' ,\ T.tid as column_type,\ <#if column.col_function?exists>'${column.col_function}'<#else>null::varchar ,\ ${column.is_visible},\ @@ -266,15 +266,15 @@ drop TABLE tmp_rpta_column2layout;\ select \ --zuerst die Basisdaten:\ <#foreach column in columns>\ - <#if column.coltype="physicalColumn">\ - ${column.srcfieldname} as ${column.srcfieldname},\ - <#elseif column.coltype="logicalColumn">\ + <#if column.coltype=="physicalColumn">\ + ${column.srcfieldname} as ${column.targetfieldname},\ + <#elseif column.coltype=="logicalColumn">\ ${column.colfunction} as ${column.targetfieldname},\ - <#elseif column.coltype="preparingColumn">\ + <#elseif column.coltype=="preparingColumn">\ ${column.colfunction} as ${column.targetfieldname},\ - <#elseif column.coltype="lookupColumn">\ + <#elseif column.coltype=="lookupColumn">\ (${column.colfunction}) as ${column.targetfieldname},\ - <#elseif column.coltype="computedColumn" || column.coltype=="processingColumn">\ + <#elseif column.coltype=="computedColumn" || column.coltype=="processingColumn">\ null::decimal(19,6) as ${column.targetfieldname},\ \ \ @@ -291,12 +291,12 @@ drop TABLE tmp_rpta_column2layout;\ --zuerst die nicht-Aggregate:\ <#assign groupby=0 />\ -- preparingColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ - -- computedColumns immer mitnehmen, da später verarbeitet\ + -- computedColumns immer mitnehmen, da später im finalen select verarbeitet\ <#foreach column in columns>\ - <#if (column.is_aggregate==0 && column.coltype!="preparingColumn" && column.coltype!="processingColumn") || column.coltype="computedColumn"> \ + <#if (column.is_aggregate==0 && column.coltype!="preparingColumn" && column.coltype!="processingColumn") || column.coltype=="computedColumn"> \ <#assign groupby=groupby+1 />\ ${column.targetfieldname},\ - <#elseif column.is_aggregate==0 && column.coltype="processingColumn"> \ + <#elseif column.is_aggregate==0 && column.coltype=="processingColumn"> \ <#assign groupby=groupby+1 />\ ${column.srcfieldname} as ${column.targetfieldname},\ \ @@ -305,10 +305,13 @@ drop TABLE tmp_rpta_column2layout;\ -- preparingColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ -- computedColumns ausgeschlossen, da später im finalen select verarbeitet\ <#foreach column in columns>\ - <#if column.is_aggregate==1 && column.coltype!="computedColumn" && column.coltype!="preparingColumn" && column.coltype!="logicalColumn"> \ - ${column.colfunction}(${column.srcfieldname}) as ${column.targetfieldname},\ - <#elseif column.coltype="logicalColumn"> \ - sum(${column.targetfieldname}) as ${column.targetfieldname},\ + <#if column.is_aggregate==1 \ + && column.colfunction?has_content \ + && column.coltype=="processingColumn"> \ + ${column.colfunction} as ${column.targetfieldname},\ + <#elseif column.is_aggregate==1 \ + && (column.coltype == "logicalColumn" || column.coltype == "lookupColumn" || column.coltype == "physicalColumn")> \ + sum(${column.targetfieldname}) as ${column.targetfieldname},\ \ \ null::char(1) as dummycol\ @@ -358,11 +361,11 @@ drop TABLE tmp_rpta_column2layout;\ \ \ <#if colnr < number_of_visible_colums>,\ - --wenn sichtbar\ + \ \ from tmp_stud2\ order by \ - <#if rpta_column_layout.sortclause !="">\ + <#if rpta_column_layout.sortclause?has_content>\ ${rpta_column_layout.sortclause}\ <#else>\ <#list 1..number_of_visible_colums as i>${i}\ diff --git a/src-modules/module/rpta/schluesseltabellen/rptaColLay_rpta_exam_unit_dim_studiengang_note_fuellen.sql b/src-modules/module/rpta/schluesseltabellen/rptaColLay_rpta_exam_unit_dim_studiengang_note_fuellen.sql index 441250b..6bea087 100644 --- a/src-modules/module/rpta/schluesseltabellen/rptaColLay_rpta_exam_unit_dim_studiengang_note_fuellen.sql +++ b/src-modules/module/rpta/schluesseltabellen/rptaColLay_rpta_exam_unit_dim_studiengang_note_fuellen.sql @@ -59,25 +59,13 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi {"uniquename":"sem_der_pruefung_str", "srcfieldname":"sem_der_pruefung", "targetfieldname":"sem_der_pruefung_str", -"column_type":"preparingColumn", -"col_function":"(select eintrag from semester where tid=sem_der_pruefung)", -"format_code":"", -"caption":"Semester der Prüfung", -"is_visible":"0", -"is_aggregate":0, -"visible_size":10, -"description":""}, - - {"uniquename":"sem_der_pruefung_str_process", -"srcfieldname":"sem_der_pruefung_str", -"targetfieldname":"sem_der_pruefung_str_process", -"column_type":"processingColumn", -"col_function":"", +"column_type":"lookupColumn", +"col_function":"select eintrag from semester where tid=sem_der_pruefung", "format_code":"", "caption":"Semester der Prüfung", "is_visible":"1", "is_aggregate":0, -"visible_size":5, +"visible_size":10, "description":""}, {"uniquename":"elementnr", @@ -105,7 +93,7 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi {"uniquename":"summe", "srcfieldname":"summe", "column_type":"physicalColumn", -"col_function":"sum", +"col_function":"", "format_code":"", "caption":"Teilnehmer", "is_visible":"1", @@ -119,7 +107,7 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi "column_type":"preparingColumn", "col_function":"(case when note > 6 then null else note end)", "format_code":"", -"caption":"Durchschnittsnote % *", +"caption":"Durchschnittsnote * Vorbereitend", "is_visible":"0", "is_aggregate":0, "visible_size":5, @@ -129,9 +117,9 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi "srcfieldname":"note_case", "targetfieldname":"note_schnitt", "column_type":"processingColumn", -"col_function":"avg", +"col_function":"avg(note_case)", "format_code":"", -"caption":"Durchschnittsnote *", +"caption":"Durchschnittsnote * Weiterverarbeitend", "is_visible":"0", "is_aggregate":1, "visible_size":5, @@ -145,29 +133,17 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi "format_code":"", "caption":"Durchschnittsnote *", "is_visible":"1", -"is_aggregate":1, -"visible_size":25, -"description":""}, - - {"uniquename":"pstatus_nb", -"srcfieldname":"pstatus", -"targetfieldname":"pstatus_nb", -"column_type":"preparingColumn", -"col_function":"(case when pstatus in (''NB'',''EN'') then 1 else 0 end)", -"format_code":"", -"caption":"Durchfallquote in % *", -"is_visible":"0", "is_aggregate":0, -"visible_size":5, +"visible_size":25, "description":""}, {"uniquename":"pstatus_nb_sum", -"srcfieldname":"pstatus_nb", +"srcfieldname":"", "targetfieldname":"pstatus_nb_sum", -"column_type":"processingColumn", -"col_function":"sum", +"column_type":"logicalColumn", +"col_function":"(case when pstatus in (''NB'',''EN'') then 1 else 0 end)", "format_code":"", -"caption":"Durchfallquote in % *", +"caption":"Durchfallquote in % * Logisch", "is_visible":"0", "is_aggregate":1, "visible_size":5, @@ -181,32 +157,20 @@ select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studi "format_code":"DEC_2", "caption":"Durchfallquote in % *", "is_visible":"1", -"is_aggregate":1, -"visible_size":25, -"description":""}, - - {"uniquename":"pvermerk_ne", -"srcfieldname":"pvermerk", -"targetfieldname":"pvermerk_ne", -"column_type":"preparingColumn", -"col_function":"(case when pvermerk in (''NE'',''N'') then 1 else 0 end)", -"format_code":"", -"caption":"Nicht erschienen", -"is_visible":"0", "is_aggregate":0, -"visible_size":5, +"visible_size":25, "description":""}, {"uniquename":"pvermerk_ne_sum", -"srcfieldname":"pvermerk_ne", +"srcfieldname":"", "targetfieldname":"pvermerk_ne_sum", -"column_type":"processingColumn", -"col_function":"sum", -"format_code":"INTEGER", +"column_type":"logicalColumn", +"col_function":"(case when pvermerk in (''NE'',''N'') then 1 else 0 end)", +"format_code":"", "caption":"Nicht erschienen", "is_visible":"1", "is_aggregate":1, -"visible_size":25, +"visible_size":5, "description":""}, {"uniquename":"rpta_exam_unit_shortcomment", diff --git a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_fuellen.sql b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_fuellen.sql index c0d7c3c..ae212ee 100644 --- a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_fuellen.sql +++ b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_fuellen.sql @@ -25,14 +25,15 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; "description":"Amtliche Standortnummer" }, {"uniquename":"dim_studiengang_stg_astat", -"caption":"HSF-Schlüssel", +"caption_der_spalte":"Fach amtlich (Land)", +"caption_in_ergebnistabelle":"HSF-Schlüssel", "srcfieldname":"dim_studiengang_stg_astat", "column_type":"physicalColumn", "col_function":"", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", -"description":"Amtliches Fach" +"description":"Amtliches Fach (Land)" }, {"uniquename":"sos_k_stufrm_astat", "caption":"Art des Studiums", diff --git a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql deleted file mode 100644 index 3ca12aa..0000000 --- a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql +++ /dev/null @@ -1,90 +0,0 @@ ---freemarker template -<#include "RPTA-Makros"/> - - -select count(*) from rpta_resultset where uniquename='sos_stud_astat'; - - -<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_rsz", -"caption":"MKW-Abfrage_Studierende_RSZ", -"rpta_resultset":"sos_stud_astat", -"whereclause":"fach_sem_zahl <= dim_studiengang_regel and dim_studiengang_regel between 1 and 20 and studiengang_nr <=2 and fach_nr <=4", -"description":"Fachbelegungen: 1. & 2. Studiengang; 1.-4. Fach; nur Studiengänge mit Angabe einer Regelstudienzeit" -} - /> - -<#assign rpta_columns = [ -{"uniquename":"sos_k_stort_astat", -"caption":"Hochschulnummer Statistik", -"srcfieldname":"sos_k_stort_astat", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Amtliche Standortnummer" -}, -{"uniquename":"dim_studiengang_stg_astat", -"caption":"HSF-Schlüssel", -"srcfieldname":"dim_studiengang_stg_astat", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Amtliches Fach" -}, -{"uniquename":"sos_k_stufrm_astat", -"caption":"Art des Studiums", -"srcfieldname":"sos_k_stufrm_astat", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Amtliche Studienform" -}, -{"uniquename":"dim_studiengang_abschluss_astat", -"caption":"Abschlussschlüssel Statistik NRW", -"srcfieldname":"dim_studiengang_abschluss_astat", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Amtlicher Abschluss" -}, -{"uniquename":"sos_k_stutyp_astat", -"caption":"Vollzeit / Teilzeit / ausbildungsintegriert / praxisintegriert / berufsintegriert", -"srcfieldname":"sos_k_stutyp_astat", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Amtlicher Studiumstyp" -}, -{"uniquename":"dim_studiengang_regel", -"caption":"Angabe der Regelstudienzeit", -"srcfieldname":"dim_studiengang_regel", -"column_type":"physicalColumn", -"col_function":"", -"is_visible":"1", -"visible_size":"10", -"is_aggregate":"0", -"description":"Regelstudienzeit in Semestern" -}, -{"uniquename":"summe", -"caption":"Anzahl der Studierenden in der Regelstudienzeit", -"srcfieldname":"summe", -"column_type":"physicalColumn", -"col_function":"sum", -"is_visible":"1", -"visible_size":"5", -"is_aggregate":"1", -"description":"Summe der Studierenden mit Fachsemester kleiner oder gleich der Regelstudienzeit" -} -] - /> - -<@rpta_column_layout_fuellen /> diff --git a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_fuellen.sql b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_fuellen.sql index 0cddbd5..69b1b5f 100644 --- a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_fuellen.sql +++ b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_fuellen.sql @@ -8,7 +8,8 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; <#assign rpta_column_layout = {"uniquename":"sos_stud_astat_stip", "caption":"Stipendiaten", "rpta_resultset":"sos_stud_astat", -"whereclause":"", +"whereclause":"matrikel_nr in (select matrikel_nr from stip_meldung)", +"sortclause":"matrikel_nr,dim_studiengang_stg,dim_studiengang_abschluss", "description":"Stipendiaten" } /> diff --git a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_meldung_fuellen.sql b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_meldung_fuellen.sql index 9609cd5..eb73496 100644 --- a/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_meldung_fuellen.sql +++ b/src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_stip_meldung_fuellen.sql @@ -15,13 +15,12 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; /> <#assign rpta_columns = [ -{"uniquename":"hs_nr", +{"uniquename":"stip_amtl_berichts_id", "caption":"Berichts - ID", "srcfieldname":"", -"targetfieldname":"hs_nr", +"targetfieldname":"stip_amtl_berichts_id", "column_type":"logicalColumn", -"col_function":"(select hs_nr from hochschulinfo)", -"format_code":"INT_NO_SEP", +"col_function":"sos_k_stort_astat", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -32,7 +31,7 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; "srcfieldname":"", "targetfieldname":"berichtsland", "column_type":"lookupColumn", -"col_function":"select apnr from cif where key=659", +"col_function":"select LPAD(apnr::TEXT, 2, ''0'') from cif where key=659", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -54,8 +53,8 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; "caption":"Hochschulart", "srcfieldname":"hs_nr", "targetfieldname":"hochschulart", -"column_type":"lookupColumn", -"col_function":"select art from kenn_hochschulen H where H.hs_nr in (select hs_nr from hochschulinfo)", +"column_type":"logicalColumn", +"col_function":"(select case when art=''FH'' then 6 when art=''U'' then 1 end from kenn_hochschulen H where H.hs_nr in (select hs_nr from hochschulinfo))", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -88,7 +87,7 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; "srcfieldname":"", "targetfieldname":"id_nummer", "column_type":"logicalColumn", -"col_function":"1::integer", +"col_function":"null::integer", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -107,8 +106,8 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; {"uniquename":"ca12_staat", "caption":"Staatsangehörigkeit", "srcfieldname":"ca12_staat", -"column_type":"physicalColumn", -"col_function":"", +"column_type":"logicalColumn", +"col_function":"(select LPAD(ca12_staat::TEXT, 3, ''0''))", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -117,8 +116,8 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; {"uniquename":"hssem", "caption":"HS-Sem.", "srcfieldname":"hssem", -"column_type":"physicalColumn", -"col_function":"", +"column_type":"logicalColumn", +"col_function":"(select LPAD(hssem::TEXT, 2, ''0''))", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", @@ -127,41 +126,42 @@ select count(*) from rpta_resultset where uniquename='sos_stud_astat'; {"uniquename":"fach_sem_zahl", "caption":"Fach-Sem.", "srcfieldname":"fach_sem_zahl", -"column_type":"physicalColumn", -"col_function":"", +"column_type":"logicalColumn", +"col_function":"(select LPAD(fach_sem_zahl::TEXT, 2, ''0''))", "is_visible":"1", "visible_size":"10", "is_aggregate":"0", "description":"" }, -{"uniquename":"dim_studiengang_abschluss", +{"uniquename":"dim_studiengang_abschluss_3steller", "caption":"Abschluss", -"srcfieldname":"dim_studiengang_abschluss", -"column_type":"physicalColumn", -"col_function":"", -"format_code":"", +"srcfieldname":"", +"targetfieldname":"dim_studiengang_abschluss_3steller", +"column_type":"logicalColumn", +"col_function":"sos_k_stufrm_astat || dim_studiengang_abschluss_astat", "is_visible":"1", -"is_aggregate":0, -"visible_size":10, -"description":"" +"visible_size":"10", +"is_aggregate":"0", +"description":"Amtlicher Abschluss 3steller" }, -{"uniquename":"dim_studiengang_stg", -"caption":"Studienfach", -"srcfieldname":"dim_studiengang_stg", -"column_type":"physicalColumn", -"col_function":"", -"format_code":"", +{"uniquename":"dim_studiengang_stg_astat_3steller", +"caption_der_spalte":"Fach amtlich (Land) 3steller", +"caption_in_ergebnistabelle":"Studienfach", +"srcfieldname":"", +"targetfieldname":"dim_studiengang_stg_astat_3steller", +"column_type":"logicalColumn", +"col_function":"(case when length(ltrim(dim_studiengang_stg_astat, ''0'')) <= 3 then right(dim_studiengang_stg_astat, 3) else dim_studiengang_stg_astat end)", "is_visible":"1", -"is_aggregate":0, -"visible_size":10, -"description":"" +"visible_size":"10", +"is_aggregate":"0", +"description":"Amtliches Fach (Land) 3steller" }, {"uniquename":"foerdermonat", "caption":"Förder-Monate", "srcfieldname":"", "targetfieldname":"foerdermonat", "column_type":"lookupColumn", -"col_function":"select LPAD(M.foerdermonat::TEXT, 2, ''0'') from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", +"col_function":"select LPAD(M.foerdermonat::TEXT, 3, ''0'') from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", "format_code":"", "is_visible":"1", "is_aggregate":0,