Daniel Quathamer
2 years ago
10 changed files with 491 additions and 41 deletions
@ -0,0 +1,129 @@
@@ -0,0 +1,129 @@
|
||||
|
||||
SELECT |
||||
S.st_studium_nr, |
||||
S.st_studstamm_nr, |
||||
S.matrikelnummer, |
||||
S.st_studiengang_nr, |
||||
S.st_studienstatus_nr, |
||||
S.semester, |
||||
S.fachsemester, |
||||
S.unikey, |
||||
L.leistung_nr, |
||||
L.leistungstyp_nr, |
||||
L.leistungsdetailtyp_kb, |
||||
L.studienidentifikator, |
||||
L.spov_abschluss, |
||||
L.stp_sp_nr, |
||||
L.veranstaltung_nummer, |
||||
L.veranstaltung_semester, |
||||
L.veranstaltung_titel, |
||||
L.veranstaltung_art, |
||||
L.semesterstunden, |
||||
L.unterrichtseinheiten, |
||||
L.thema_individuell, |
||||
L.pv_notenskala_nr, |
||||
L.note, |
||||
L.note_name, |
||||
L.note_zahl, |
||||
L.pv_pruef_zusatz_typen_nr, |
||||
L.note_zusatz, |
||||
L.note_zusatz_name, |
||||
L.note_positiv_flag, |
||||
L.note_negativ_flag, |
||||
L.pv_notenskala_typ_nr, |
||||
L.pv_notenskala_typ_kb, |
||||
L.pv_notenskala_typ_name, |
||||
L.credits, |
||||
date(L.leistungsdatum) as leistungsdatum, |
||||
L.anerkannt_flag, |
||||
L.zusatzleistung_flag, |
||||
L.leistungsstatus_nr, |
||||
L.leistungsstatus_map_kb, |
||||
2::integer as abschnitt, --provisorisch erstmal nur Hauptprüfungen |
||||
null::integer as pnr |
||||
into temp tmp_pruef |
||||
FROM costage_st_studien_aggr S, costage_leistungen L, costage_st_semester E, costage_leistungen_typen T |
||||
where L.st_studium_nr=S.st_studium_nr |
||||
and L.matrikelnummer=S.matrikelnummer::varchar(255) |
||||
and E.semester_id=L.veranstaltung_semester |
||||
and E.semester_tid=S.semester |
||||
and T.leistungstyp_nr=L.leistungstyp_nr |
||||
-- TSAB/AB: |
||||
and T.kurzbezeichnung='AP' --Abschlussprüfung |
||||
and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung |
||||
--px_leistungen_status_typen_v: |
||||
--4^F^Letztgültig^Final^ |
||||
--1^P^in Bearbeitung^in process^ |
||||
--2^V^gültige Leistung^valid^ |
||||
--3^I^ungültige Leistung^invalid^ |
||||
--5^D^gelöscht^deleted^ |
||||
; |
||||
--TSAB: |
||||
update tmp_pruef set pnr=9068 |
||||
where leistungsdetailtyp_kb in ('TSAB'); |
||||
|
||||
--Abschluss Bachelorstudium: |
||||
update tmp_pruef set pnr=9024 |
||||
where leistungsdetailtyp_kb in ('BAKN') |
||||
; |
||||
--Abschluss Masterstudium |
||||
update tmp_pruef set pnr=9025 |
||||
where leistungsdetailtyp_kb in ('BAKN'); |
||||
|
||||
--Staatsexamen |
||||
update tmp_pruef set pnr=9054 |
||||
where leistungsdetailtyp_kb in ('STEX'); |
||||
|
||||
--Abschluss eines Ergänzungsstudiums |
||||
update tmp_pruef set pnr=9060 |
||||
where leistungsdetailtyp_kb in ('ERGAB'); |
||||
|
||||
|
||||
|
||||
truncate table costage_st_pruef_aggr; |
||||
insert into costage_st_pruef_aggr(st_studium_nr, |
||||
st_studstamm_nr, |
||||
matrikelnummer, |
||||
semester, |
||||
st_studiengang_nr, |
||||
unikey, |
||||
studienidentifikator, |
||||
fachsemester, |
||||
leistung_nr, |
||||
leistungstyp_nr, |
||||
leistungsdetailtyp_kb, |
||||
pnr, |
||||
abschnitt, |
||||
stp_sp_nr, |
||||
note, |
||||
credits, |
||||
leistungsdatum, |
||||
anerkannt_flag, |
||||
leistungsstatus_map_kb, |
||||
summe) |
||||
select |
||||
st_studium_nr, |
||||
st_studstamm_nr, |
||||
matrikelnummer, |
||||
semester, |
||||
st_studiengang_nr, |
||||
unikey, |
||||
substring(studienidentifikator from 1 for 255), |
||||
fachsemester, |
||||
leistung_nr, |
||||
leistungstyp_nr, |
||||
leistungsdetailtyp_kb, |
||||
pnr, |
||||
abschnitt, |
||||
stp_sp_nr, |
||||
case when pv_notenskala_typ_kb in ('DE1','DE2','DE3','DE4','DE5','DE6','DE7') or pv_notenskala_typ_kb is null then note_zahl else null::float end as note, |
||||
credits, |
||||
leistungsdatum, |
||||
anerkannt_flag, |
||||
leistungsstatus_map_kb, |
||||
count(*) |
||||
from tmp_pruef |
||||
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19; |
||||
|
||||
drop table tmp_pruef; |
||||
|
@ -0,0 +1,67 @@
@@ -0,0 +1,67 @@
|
||||
43080^Studiengang-Nr.^110^0^0^140^150^1^integer^70^0^13^<<SQL>> --Freemarker template\ |
||||
<#list 1..6 as i>\ |
||||
select ${i},'${i}. Studiengang' from xdummy\ |
||||
<#if i_has_next> union </#if>\ |
||||
</#list>\ |
||||
order by 1^ ^^ |
||||
43081^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^ |
||||
43083^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^^^ |
||||
43084^Prüfungsstatus^14^350^-1^140^180^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=622 order by 2^^ ^ |
||||
43085^Studienabschnitt^10^330^-1^130^150^1^integer^4^0^13^<<SQL>> select tid, eintrag from studienabschnitt where tid <= 2;^^<<SQL>> select tid, eintrag from studienabschnitt where tid = 2;^ |
||||
43086^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \ |
||||
--freemarker template\ |
||||
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_st_studiengaenge')\ |
||||
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\ |
||||
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \ |
||||
</#if>\ |
||||
order by 2^^^ |
||||
43087^Leistungsdetailtyp^35^350^-1^140^100^10^integer^30^0^1^<<SQL>> select leistungsdetailtyp_kb,name_de from costage_leistungen_detail_typen\ |
||||
where leistungsdetailtyp_kb in (select distinct leistungsdetailtyp_kb from costage_st_pruef_aggr);^^^ |
||||
43089^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today() between date(semester_anfang) and date(semester_ende);^ |
||||
43090^Fach-Nr.^119^0^0^140^150^1^integer^20^0^13^<<SQL>> --Freemarker template\ |
||||
<#list 1..10 as i>\ |
||||
select ${i},'${i}. Fach' from xdummy\ |
||||
<#if i_has_next> union </#if>\ |
||||
</#list>\ |
||||
order by 1^ ^^ |
||||
43091^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^^^ |
||||
43092^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
||||
--freemarker template\ |
||||
select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F,\ |
||||
sx_tables T where F.table_name=T.name and F.currentlyused=1\ |
||||
--Pseudonyme eingeschaltet:\ |
||||
and (F.name != 'matrikel_nr' or 0=(select \ |
||||
count(*) from konstanten where beschreibung='SOS_MTKNR_EXT'\ |
||||
and apnr=1)) \ |
||||
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\ |
||||
and (F.table_name ='costage_st_studien_aggr'\ |
||||
/* or F.table_name in (<<Weitere Tabellen>>) */) \ |
||||
<#else>\ |
||||
and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fieldname) from stylesheet_field where stylesheet_id in \ |
||||
(select tid from sx_stylesheets where filename=<<tablestylesheet>>))\ |
||||
</#if>\ |
||||
order by 2;^^^ |
||||
43093^Fach^6^0^0^140^150^50^char^30^0^1^<<SQL>>\ |
||||
SELECT \ |
||||
skz_key,\ |
||||
skz_name\ |
||||
FROM costage_st_studienkennzahlen\ |
||||
/* where unikey=<<Hochschule>> */\ |
||||
order by 2\ |
||||
;^^^ |
||||
43094^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^ |
||||
43095^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 order by ord^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 and S.ord=1^ |
||||
43096^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^ |
||||
43099^Hochschule^5^350^-1^140^80^1^char^255^0^1^<<SQL>>select distinct K.unikey,K.unikey\ |
||||
from costage_st_studienkennzahlen K\ |
||||
order by 2;^ ^<<SQL>> select distinct K.unikey,K.unikey\ |
||||
from costage_st_studienkennzahlen K, hochschulinfo H\ |
||||
where K.unikey=H.hs_nr::char(10)^ |
||||
43100^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^ |
||||
43101^Abschluss^7^0^0^140^170^5^char^30^0^1^<<SQL>> SELECT \ |
||||
code,\ |
||||
name\ |
||||
FROM costage_st_abschlussziele_lokal\ |
||||
order by 2;^^^ |
||||
43102^Matrikel-Nr.^20^350^-1^150^180^1^char^200^0^0^^^^ |
||||
43103^##line##^40^0^0^100^100^1^char^5000^0^8^^^1^ |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
43080^310^ |
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
43080^43080^ |
||||
43080^43081^ |
||||
43080^43083^ |
||||
43080^43084^ |
||||
43080^43085^ |
||||
43080^43086^ |
||||
43080^43087^ |
||||
43080^43089^ |
||||
43080^43090^ |
||||
43080^43091^ |
||||
43080^43092^ |
||||
43080^43093^ |
||||
43080^43094^ |
||||
43080^43095^ |
||||
43080^43096^ |
||||
43080^43099^ |
||||
43080^43100^ |
||||
43080^43101^ |
||||
43080^43102^ |
||||
43080^43103^ |
@ -0,0 +1,133 @@
@@ -0,0 +1,133 @@
|
||||
43080^Abschlussprüfungen Datenblatt (CO)^--Freemarker Template\ |
||||
<#include "SQL_lingua_franca"/>\ |
||||
<#include "SuperX_general"/>\ |
||||
<#include "SQL_multitable_output"/>\ |
||||
\ |
||||
--ram excelexport \ |
||||
<#include "SQL_lingua_franca"/>\ |
||||
<#include "SuperX_general"/>\ |
||||
<#include "SQL_multitable_output"/>\ |
||||
\ |
||||
<sqlvars>\ |
||||
<sqlvar name="get_tables"><![CDATA[\ |
||||
SELECT distinct name,name\ |
||||
from sx_tables\ |
||||
where name in ('costage_st_pruef_aggr'\ |
||||
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\ |
||||
\ |
||||
)\ |
||||
order by 2;]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="get_table_joins"><![CDATA[\ |
||||
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \ |
||||
from sx_fields where table_name in ('costage_st_pruef_aggr'\ |
||||
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\ |
||||
and foreignkey_tab in ('costage_st_pruef_aggr'\ |
||||
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\ |
||||
;]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="get_felder"><![CDATA[\ |
||||
SELECT name,\ |
||||
caption,\ |
||||
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\ |
||||
|| '#' || trim(string_not_null(foreignkey_cap))\ |
||||
|| '#' || trim(string_not_null(foreignkey_cond))\ |
||||
|| '#' || trim(string_not_null(foreignkey_func))\ |
||||
|| '#' || trim(string_not_null(table_name))\ |
||||
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\ |
||||
from sx_fields\ |
||||
where table_name in ('costage_st_pruef_aggr'\ |
||||
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\ |
||||
)\ |
||||
and currentlyused=1\ |
||||
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\ |
||||
order by 2,3;]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="get_felder_fk"><![CDATA[\ |
||||
SELECT name,\ |
||||
caption,\ |
||||
(trim(table_name)\ |
||||
|| '#' || trim(string_not_null(foreignkey_tab))\ |
||||
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\ |
||||
from sx_fields\ |
||||
where table_name in ('costage_st_pruef_aggr' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\ |
||||
)\ |
||||
and currentlyused=1\ |
||||
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\ |
||||
order by 2,3;]]>\ |
||||
</sqlvar>\ |
||||
</sqlvars>\ |
||||
\ |
||||
<@generate_multitable_list />\ |
||||
<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\ |
||||
<@generate_foreign_fields_multitable />\ |
||||
\ |
||||
\ |
||||
<#assign filter="\ |
||||
/* and hrst in (<<Hörerstatus>>) */\ |
||||
/* and semester >= <<Seit Semester>> */\ |
||||
/* and semester <= <<Bis Semester>> */\ |
||||
/* AND leistungsdetailtyp_kb in (<<Leistungsdetailtyp>>) */\ |
||||
/* and leistungsstatus_map_kb in(<<Prüfungsstatus>>) */\ |
||||
/* and costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\ |
||||
/* and costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.stg in (<<Fach>>)) */\ |
||||
/* and studiengang_nr =<<Studiengang-Nr.>> */\ |
||||
/* and fach_nr =<<Fach-Nr.>> */\ |
||||
/* and costage_st_pruef_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\ |
||||
/* and costage_st_pruef_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\ |
||||
" />\ |
||||
\ |
||||
\ |
||||
<#if "<<Matrikel-Nr.>>"!="">\ |
||||
<#assign filter=filter+" and costage_st_pruef_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\ |
||||
</#if>\ |
||||
\ |
||||
\ |
||||
\ |
||||
<@generate_resultset_multitable tabellen=table_list\ |
||||
p_show_keys=<<Schlüssel anzeigen>>\ |
||||
p_field_list_select=field_list_select\ |
||||
p_foreign_fields=foreign_fields\ |
||||
p_filter=filter\ |
||||
p_field_list_groupby=field_list_groupby\ |
||||
p_join_clause=join_clause\ |
||||
/>^--Freemarker Template \ |
||||
<sqlvars>\ |
||||
<sqlvar name="basetable">select 'costage_st_pruef_aggr' from xdummy</sqlvar>\ |
||||
<sqlvar name="restriction"><![CDATA[\ |
||||
<#assign restrict=DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)/>;\ |
||||
select '${restrict?replace("\\x0027","\\x0027\\x0027")}' from xdummy;]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="get_felder"><![CDATA[\ |
||||
SELECT caption,\ |
||||
foreignkey_tab,\ |
||||
description as strukturStr\ |
||||
from sx_fields\ |
||||
where table_name in ('${basetable}'\ |
||||
${restriction}\ |
||||
)\ |
||||
and currentlyused=1\ |
||||
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\ |
||||
order by 1;]]>\ |
||||
</sqlvar>\ |
||||
</sqlvars>\ |
||||
XIL List\ |
||||
sizable_columns horizontal_scrolling\ |
||||
white_space_color=COLOR_WHITE fixed_columns=1\ |
||||
min_heading_height=35\ |
||||
<#assign i=1 />\ |
||||
<#if get_felder?has_content >\ |
||||
<#foreach myfield in get_felder>\ |
||||
<#assign i=i+1 />\ |
||||
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\ |
||||
row_selectable col_selectable rightJust heading_platform readonly\ |
||||
width=20\ |
||||
<#if myfield.name != '' && <<Schlüssel anzeigen>>==1>\ |
||||
<#assign i=i+1 />\ |
||||
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\ |
||||
row_selectable col_selectable rightJust heading_platform readonly\ |
||||
width=20\ |
||||
</#if>\ |
||||
</#foreach>\ |
||||
</#if>\ |
||||
@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Studierendenstatistik, Studiengänge und Lehreinheiten^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^ |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
310^43080^ |
Loading…
Reference in new issue