Daniel Quathamer
2 years ago
8 changed files with 357 additions and 4 deletions
@ -0,0 +1,80 @@ |
|||||||
|
SELECT B.nr, |
||||||
|
B.st_studstamm_nr, |
||||||
|
B.st_sem_nr, |
||||||
|
B.st_studiengang_nr, |
||||||
|
B.st_studfrm_nr, |
||||||
|
B.bw_sb_svor_nr, |
||||||
|
B.bw_zul_art_nr, |
||||||
|
B.bw_typ_kb, |
||||||
|
B.zurueckgezogen_am, |
||||||
|
B.fristbeginn, |
||||||
|
B.fristende, |
||||||
|
B.einstiegs_fachsemester, |
||||||
|
B.fachsemester_gewaehlt, |
||||||
|
B.abgeschickt_datum, |
||||||
|
E.semester_tid as semester, |
||||||
|
S.matrikelnummer, |
||||||
|
null::char(10) as stufrm, |
||||||
|
null::char(10) as unikey, |
||||||
|
null::integer as studiengang_nr, |
||||||
|
null::integer as fach_nr, |
||||||
|
null::integer as st_studiengang_nr_msg, |
||||||
|
null::date as leistungsdatum_msg, |
||||||
|
null::integer as semester_msg |
||||||
|
into temp tmp_bew |
||||||
|
FROM costage_st_semester E, costage_bw_bewerbungen B |
||||||
|
left outer join costage_st_studierendenstammdaten S |
||||||
|
on (B.st_studstamm_nr=S.st_studstamm_nr) |
||||||
|
where E.st_sem_nr=B.st_sem_nr; |
||||||
|
|
||||||
|
|
||||||
|
update tmp_bew set unikey=K.unikey |
||||||
|
from costage_st_studiengaenge G, costage_st_studienkennzahlen K |
||||||
|
where G.st_studiengang_nr=tmp_bew.st_studiengang_nr |
||||||
|
and K.st_skz_nr=G.st_skz_nr |
||||||
|
; |
||||||
|
|
||||||
|
update tmp_bew set stufrm=F.statistik_code |
||||||
|
from costage_st_studienformen F |
||||||
|
where F.nr=tmp_bew.st_studfrm_nr |
||||||
|
; |
||||||
|
|
||||||
|
truncate table costage_bw_antr_aggr; |
||||||
|
insert into costage_bw_antr_aggr( nr, |
||||||
|
st_studstamm_nr, |
||||||
|
matrikelnummer, |
||||||
|
semester, |
||||||
|
st_studiengang_nr, |
||||||
|
st_studiengang_nr_msg, |
||||||
|
unikey, |
||||||
|
studiengang_nr, |
||||||
|
fach_nr, |
||||||
|
fachsemester, |
||||||
|
stufrm, |
||||||
|
semester_msg, |
||||||
|
bw_sb_svor_nr, |
||||||
|
bw_zul_art_nr, |
||||||
|
bw_typ_kb, |
||||||
|
summe |
||||||
|
) |
||||||
|
SELECT nr, |
||||||
|
st_studstamm_nr, |
||||||
|
val(matrikelnummer), |
||||||
|
semester, |
||||||
|
st_studiengang_nr, |
||||||
|
st_studiengang_nr_msg, |
||||||
|
unikey, |
||||||
|
studiengang_nr, |
||||||
|
fach_nr, |
||||||
|
einstiegs_fachsemester as fachsemester, |
||||||
|
stufrm, |
||||||
|
semester_msg, |
||||||
|
bw_sb_svor_nr, |
||||||
|
bw_zul_art_nr, |
||||||
|
bw_typ_kb, |
||||||
|
count(*) |
||||||
|
from tmp_bew |
||||||
|
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; |
||||||
|
|
||||||
|
drop table tmp_bew; |
||||||
|
|
@ -0,0 +1,66 @@ |
|||||||
|
43110^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^ ^^ |
||||||
|
43111^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);^ |
||||||
|
43113^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;^^^ |
||||||
|
43114^Zulassungsart^14^350^-1^140^180^1^integer^30^0^1^<<SQL>> select nr, name\ |
||||||
|
FROM costage_bw_zulassungsarten order by 2^^ ^ |
||||||
|
43115^Auswertungsebene Prüfungen^25^330^-1^130^150^1^char^4^0^13^<<SQL>> select 'G','Gesamtabschluss' from xdummy\ |
||||||
|
union select 'F','Absolvent*innenfachfälle' from xdummy\ |
||||||
|
union select 'T','Teilstudienabschluss' from xdummy\ |
||||||
|
order by 1;^^ ^ |
||||||
|
43116^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^^^ |
||||||
|
43117^bis Fachsemester^20^350^-1^140^10^1^integer^30^0^0^ ^ ^ ^ |
||||||
|
43119^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);^ |
||||||
|
43120^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^ ^^ |
||||||
|
43121^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^^^ |
||||||
|
43122^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\ |
||||||
|
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\ |
||||||
|
and (F.table_name ='costage_bw_antr_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;^^^ |
||||||
|
43123^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\ |
||||||
|
;^^^ |
||||||
|
43124^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^ |
||||||
|
43125^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^ |
||||||
|
43126^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'^ |
||||||
|
43129^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)^ |
||||||
|
43130^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^ |
||||||
|
43131^Abschluss^7^0^0^140^170^5^char^30^0^1^<<SQL>> SELECT \ |
||||||
|
code,\ |
||||||
|
name\ |
||||||
|
FROM costage_st_abschlussziele_lokal\ |
||||||
|
order by 2;^^^ |
||||||
|
43132^Matrikel-Nr.^30^350^-1^150^180^1^char^200^0^0^^^^ |
||||||
|
43133^##line##^40^0^0^100^100^1^char^5000^0^8^^^1^ |
@ -0,0 +1 @@ |
|||||||
|
43110^310^ |
@ -0,0 +1,20 @@ |
|||||||
|
43110^43110^ |
||||||
|
43110^43111^ |
||||||
|
43110^43113^ |
||||||
|
43110^43114^ |
||||||
|
43110^43115^ |
||||||
|
43110^43116^ |
||||||
|
43110^43117^ |
||||||
|
43110^43119^ |
||||||
|
43110^43120^ |
||||||
|
43110^43121^ |
||||||
|
43110^43122^ |
||||||
|
43110^43123^ |
||||||
|
43110^43124^ |
||||||
|
43110^43125^ |
||||||
|
43110^43126^ |
||||||
|
43110^43129^ |
||||||
|
43110^43130^ |
||||||
|
43110^43131^ |
||||||
|
43110^43132^ |
||||||
|
43110^43133^ |
@ -0,0 +1,136 @@ |
|||||||
|
43110^Bewerbungen Datenblatt (CO)^--Freemarker Template\ |
||||||
|
<#include "SQL_lingua_franca"/>\ |
||||||
|
<#include "SuperX_general"/>\ |
||||||
|
<#include "SQL_multitable_output"/>\ |
||||||
|
\ |
||||||
|
--ram excelexport \ |
||||||
|
\ |
||||||
|
<sqlvars>\ |
||||||
|
<sqlvar name="get_tables"><![CDATA[\ |
||||||
|
SELECT distinct name,name\ |
||||||
|
from sx_tables\ |
||||||
|
where name in ('costage_bw_antr_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_bw_antr_aggr'\ |
||||||
|
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\ |
||||||
|
and foreignkey_tab in ('costage_bw_antr_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_bw_antr_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_bw_antr_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 bw_zul_art_nr in (<<Zulassungsart>>) */\ |
||||||
|
/* and costage_bw_antr_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\ |
||||||
|
/* and studiengang_nr =<<Studiengang-Nr.>> */\ |
||||||
|
/* and fach_nr =<<Fach-Nr.>> */\ |
||||||
|
/* and costage_bw_antr_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_bw_antr_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\ |
||||||
|
/* and costage_bw_antr_aggr.unikey=<<Hochschule>> */\ |
||||||
|
/* and semester >= <<Seit Semester>> */\ |
||||||
|
/* and semester <= <<Bis Semester>> */\ |
||||||
|
/* and fachsemester <= <<bis Fachsemester>> */\ |
||||||
|
" />\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
<#if "<<Matrikel-Nr.>>"!="">\ |
||||||
|
<#assign filter=filter+" and costage_bw_antr_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\ |
||||||
|
</#if>\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
<#assign fach_filter="1=1" />\ |
||||||
|
--Default: TSG\ |
||||||
|
/* <#assign fach_filter="costage_bw_antr_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) "/> \ |
||||||
|
*/\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
<#assign filter=filter +" and " + fach_filter />\ |
||||||
|
\ |
||||||
|
<@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_bw_antr_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^Bewerbungen Datenblatt aus CO^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^ |
@ -0,0 +1 @@ |
|||||||
|
310^43110^ |
Loading…
Reference in new issue