Compare commits
No commits in common. 'master' and 'rpta_0.3_Release' have entirely different histories.
master
...
rpta_0.3_R
130 changed files with 1165 additions and 15014 deletions
@ -1,740 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<transformation> |
|
||||||
<info> |
|
||||||
<name>excel_into_tmp_stip_meldung</name> |
|
||||||
<description/> |
|
||||||
<extended_description/> |
|
||||||
<trans_version/> |
|
||||||
<trans_type>Normal</trans_type> |
|
||||||
<trans_status>0</trans_status> |
|
||||||
<directory>/</directory> |
|
||||||
<parameters> |
|
||||||
<parameter> |
|
||||||
<name>Hochschule</name> |
|
||||||
<default_value>361</default_value> |
|
||||||
<description/> |
|
||||||
</parameter> |
|
||||||
<parameter> |
|
||||||
<name>Modus</name> |
|
||||||
<default_value>2</default_value> |
|
||||||
<description>2=Löschen und Hinzufügen oder nur 1=Hinzufügen</description> |
|
||||||
</parameter> |
|
||||||
<parameter> |
|
||||||
<name>PATH_TO_UPLOADFILE</name> |
|
||||||
<default_value>file:///home/superx/Downloads/Template_für_die_manuelle_Schnittstelle_des_STBB.xlsx</default_value> |
|
||||||
<description>Pfad zur Exceldatei mit Quelldaten</description> |
|
||||||
</parameter> |
|
||||||
</parameters> |
|
||||||
<log> |
|
||||||
<trans-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<size_limit_lines/> |
|
||||||
<interval/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>TRANSNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>TRANSNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STATUS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STATUS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_READ</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_READ</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_WRITTEN</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_WRITTEN</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_UPDATED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_UPDATED</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_INPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_INPUT</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_OUTPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_OUTPUT</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_REJECTED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_REJECTED</name> |
|
||||||
<subject/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ERRORS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ERRORS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STARTDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STARTDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ENDDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ENDDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOGDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOGDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>DEPDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>DEPDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>REPLAYDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>REPLAYDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_FIELD</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_FIELD</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>EXECUTING_SERVER</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>EXECUTING_SERVER</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>EXECUTING_USER</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>EXECUTING_USER</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CLIENT</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>CLIENT</name> |
|
||||||
</field> |
|
||||||
</trans-log-table> |
|
||||||
<perf-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<interval/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>SEQ_NR</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>SEQ_NR</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOGDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOGDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>TRANSNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>TRANSNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STEPNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STEPNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STEP_COPY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STEP_COPY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_READ</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_READ</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_WRITTEN</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_WRITTEN</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_UPDATED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_UPDATED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_INPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_INPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_OUTPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_OUTPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_REJECTED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_REJECTED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ERRORS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ERRORS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>INPUT_BUFFER_ROWS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>INPUT_BUFFER_ROWS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OUTPUT_BUFFER_ROWS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OUTPUT_BUFFER_ROWS</name> |
|
||||||
</field> |
|
||||||
</perf-log-table> |
|
||||||
<channel-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOGGING_OBJECT_TYPE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOGGING_OBJECT_TYPE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_NAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_NAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_COPY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_COPY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>REPOSITORY_DIRECTORY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>REPOSITORY_DIRECTORY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>FILENAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>FILENAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_REVISION</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_REVISION</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>PARENT_CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>PARENT_CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ROOT_CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ROOT_CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
</channel-log-table> |
|
||||||
<step-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>TRANSNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>TRANSNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STEPNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STEPNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STEP_COPY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STEP_COPY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_READ</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_READ</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_WRITTEN</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_WRITTEN</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_UPDATED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_UPDATED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_INPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_INPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_OUTPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_OUTPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_REJECTED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_REJECTED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ERRORS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ERRORS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_FIELD</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>LOG_FIELD</name> |
|
||||||
</field> |
|
||||||
</step-log-table> |
|
||||||
<metrics-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_CODE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_CODE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_DESCRIPTION</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_DESCRIPTION</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_SUBJECT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_SUBJECT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_TYPE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_TYPE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>METRICS_VALUE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>METRICS_VALUE</name> |
|
||||||
</field> |
|
||||||
</metrics-log-table> |
|
||||||
</log> |
|
||||||
<maxdate> |
|
||||||
<connection/> |
|
||||||
<table/> |
|
||||||
<field/> |
|
||||||
<offset>0.0</offset> |
|
||||||
<maxdiff>0.0</maxdiff> |
|
||||||
</maxdate> |
|
||||||
<size_rowset>10000</size_rowset> |
|
||||||
<sleep_time_empty>50</sleep_time_empty> |
|
||||||
<sleep_time_full>50</sleep_time_full> |
|
||||||
<unique_connections>N</unique_connections> |
|
||||||
<feedback_shown>Y</feedback_shown> |
|
||||||
<feedback_size>50000</feedback_size> |
|
||||||
<using_thread_priorities>Y</using_thread_priorities> |
|
||||||
<shared_objects_file/> |
|
||||||
<capture_step_performance>N</capture_step_performance> |
|
||||||
<step_performance_capturing_delay>1000</step_performance_capturing_delay> |
|
||||||
<step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> |
|
||||||
<dependencies> |
|
||||||
</dependencies> |
|
||||||
<partitionschemas> |
|
||||||
</partitionschemas> |
|
||||||
<slaveservers> |
|
||||||
</slaveservers> |
|
||||||
<clusterschemas> |
|
||||||
</clusterschemas> |
|
||||||
<created_user>-</created_user> |
|
||||||
<created_date>2022/06/27 15:49:54.602</created_date> |
|
||||||
<modified_user>-</modified_user> |
|
||||||
<modified_date>2022/06/27 15:49:54.602</modified_date> |
|
||||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> |
|
||||||
<is_key_private>N</is_key_private> |
|
||||||
</info> |
|
||||||
<notepads> |
|
||||||
</notepads> |
|
||||||
<order> |
|
||||||
<hop> |
|
||||||
<from>Microsoft Excel Input</from> |
|
||||||
<to>Table output tmp_stip_meldung</to> |
|
||||||
<enabled>Y</enabled> |
|
||||||
</hop> |
|
||||||
</order> |
|
||||||
<step> |
|
||||||
<name>Microsoft Excel Input</name> |
|
||||||
<type>ExcelInput</type> |
|
||||||
<description/> |
|
||||||
<distribute>Y</distribute> |
|
||||||
<custom_distribution/> |
|
||||||
<copies>1</copies> |
|
||||||
<partitioning> |
|
||||||
<method>none</method> |
|
||||||
<schema_name/> |
|
||||||
</partitioning> |
|
||||||
<header>Y</header> |
|
||||||
<noempty>Y</noempty> |
|
||||||
<stoponempty>N</stoponempty> |
|
||||||
<filefield/> |
|
||||||
<sheetfield/> |
|
||||||
<sheetrownumfield/> |
|
||||||
<rownumfield/> |
|
||||||
<sheetfield/> |
|
||||||
<filefield/> |
|
||||||
<limit>0</limit> |
|
||||||
<encoding>UTF-8</encoding> |
|
||||||
<add_to_result_filenames>Y</add_to_result_filenames> |
|
||||||
<accept_filenames>N</accept_filenames> |
|
||||||
<accept_field/> |
|
||||||
<accept_stepname/> |
|
||||||
<file> |
|
||||||
<name>${PATH_TO_UPLOADFILE}</name> |
|
||||||
<filemask/> |
|
||||||
<exclude_filemask/> |
|
||||||
<file_required>N</file_required> |
|
||||||
<include_subfolders>N</include_subfolders> |
|
||||||
</file> |
|
||||||
<fields> |
|
||||||
<field> |
|
||||||
<name>Matrikel-Nr.</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format>#</format> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Vorname</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Nachname</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Status</name> |
|
||||||
<type>Integer</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal>.</decimal> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Fach</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Abschluss</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Adresszusatz</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Straße</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>PLZ</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Ort</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Fördermonat</name> |
|
||||||
<type>Number</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<name>Bafög</name> |
|
||||||
<type>String</type> |
|
||||||
<length>-1</length> |
|
||||||
<precision>-1</precision> |
|
||||||
<trim_type>none</trim_type> |
|
||||||
<repeat>N</repeat> |
|
||||||
<format/> |
|
||||||
<currency/> |
|
||||||
<decimal/> |
|
||||||
<group/> |
|
||||||
</field> |
|
||||||
</fields> |
|
||||||
<sheets> |
|
||||||
<sheet> |
|
||||||
<name>Tabellenausgabe Studierend..1</name> |
|
||||||
<startrow>3</startrow> |
|
||||||
<startcol>0</startcol> |
|
||||||
</sheet> |
|
||||||
</sheets> |
|
||||||
<strict_types>N</strict_types> |
|
||||||
<error_ignored>N</error_ignored> |
|
||||||
<error_line_skipped>N</error_line_skipped> |
|
||||||
<bad_line_files_destination_directory/> |
|
||||||
<bad_line_files_extension>warning</bad_line_files_extension> |
|
||||||
<error_line_files_destination_directory/> |
|
||||||
<error_line_files_extension>error</error_line_files_extension> |
|
||||||
<line_number_files_destination_directory/> |
|
||||||
<line_number_files_extension>line</line_number_files_extension> |
|
||||||
<shortFileFieldName/> |
|
||||||
<pathFieldName/> |
|
||||||
<hiddenFieldName/> |
|
||||||
<lastModificationTimeFieldName/> |
|
||||||
<uriNameFieldName/> |
|
||||||
<rootUriNameFieldName/> |
|
||||||
<extensionFieldName/> |
|
||||||
<sizeFieldName/> |
|
||||||
<spreadsheet_type>POI</spreadsheet_type> |
|
||||||
<cluster_schema/> |
|
||||||
<remotesteps> |
|
||||||
<input> |
|
||||||
</input> |
|
||||||
<output> |
|
||||||
</output> |
|
||||||
</remotesteps> |
|
||||||
<GUI> |
|
||||||
<xloc>112</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
<draw>Y</draw> |
|
||||||
</GUI> |
|
||||||
</step> |
|
||||||
|
|
||||||
<step> |
|
||||||
<name>Table output tmp_stip_meldung</name> |
|
||||||
<type>TableOutput</type> |
|
||||||
<description/> |
|
||||||
<distribute>Y</distribute> |
|
||||||
<custom_distribution/> |
|
||||||
<copies>1</copies> |
|
||||||
<partitioning> |
|
||||||
<method>none</method> |
|
||||||
<schema_name/> |
|
||||||
</partitioning> |
|
||||||
<connection>eduetl</connection> |
|
||||||
<schema/> |
|
||||||
<table>tmp_stip_meldung</table> |
|
||||||
<commit>100000</commit> |
|
||||||
<truncate>N</truncate> |
|
||||||
<ignore_errors>N</ignore_errors> |
|
||||||
<use_batch>Y</use_batch> |
|
||||||
<specify_fields>Y</specify_fields> |
|
||||||
<partitioning_enabled>N</partitioning_enabled> |
|
||||||
<partitioning_field/> |
|
||||||
<partitioning_daily>N</partitioning_daily> |
|
||||||
<partitioning_monthly>Y</partitioning_monthly> |
|
||||||
<tablename_in_field>N</tablename_in_field> |
|
||||||
<tablename_field/> |
|
||||||
<tablename_in_table>Y</tablename_in_table> |
|
||||||
<return_keys>N</return_keys> |
|
||||||
<return_field/> |
|
||||||
<fields> |
|
||||||
<field> |
|
||||||
<column_name>matrikel_nr</column_name> |
|
||||||
<stream_name>Matrikel-Nr.</stream_name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<column_name>foerdermonat</column_name> |
|
||||||
<stream_name>Fördermonat</stream_name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<column_name>bafoeg</column_name> |
|
||||||
<stream_name>Bafög</stream_name> |
|
||||||
</field> |
|
||||||
</fields> |
|
||||||
<cluster_schema/> |
|
||||||
<remotesteps> |
|
||||||
<input> |
|
||||||
</input> |
|
||||||
<output> |
|
||||||
</output> |
|
||||||
</remotesteps> |
|
||||||
<GUI> |
|
||||||
<xloc>544</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
<draw>Y</draw> |
|
||||||
</GUI> |
|
||||||
</step> |
|
||||||
|
|
||||||
<step_error_handling> |
|
||||||
</step_error_handling> |
|
||||||
<slave-step-copy-partition-distribution> |
|
||||||
</slave-step-copy-partition-distribution> |
|
||||||
<slave_transformation>N</slave_transformation> |
|
||||||
</transformation> |
|
||||||
@ -1,33 +0,0 @@ |
|||||||
update tmp_stip_meldung |
|
||||||
set userinfo_id=1, |
|
||||||
zeitstempel=now() |
|
||||||
; |
|
||||||
--delete from tmp_stip_meldung where bafoeg is null; |
|
||||||
--delete from tmp_stip_meldung where foerdermonat is null and bafoeg = 'j'; |
|
||||||
|
|
||||||
|
|
||||||
delete from stip_meldung |
|
||||||
where matrikel_nr in (select M.matrikel_nr::integer from tmp_stip_meldung M) -- Hinzufügen |
|
||||||
; |
|
||||||
|
|
||||||
delete from stip_meldung where ${Modus}=2; -- Löschen und Hinzufügen |
|
||||||
|
|
||||||
INSERT INTO stip_meldung |
|
||||||
( |
|
||||||
matrikel_nr, |
|
||||||
foerdermonat, |
|
||||||
bafoeg, |
|
||||||
userinfo_id, |
|
||||||
zeitstempel |
|
||||||
) |
|
||||||
select distinct |
|
||||||
matrikel_nr::integer, |
|
||||||
foerdermonat, |
|
||||||
bafoeg, |
|
||||||
userinfo_id, |
|
||||||
zeitstempel |
|
||||||
from tmp_stip_meldung |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_stip_meldung; |
|
||||||
@ -1,443 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<job> |
|
||||||
<name>stip_meldung_upload</name> |
|
||||||
<description/> |
|
||||||
<extended_description/> |
|
||||||
<job_version/> |
|
||||||
<job_status>0</job_status> |
|
||||||
<directory>/</directory> |
|
||||||
<created_user>-</created_user> |
|
||||||
<created_date>2022/06/27 14:59:09.135</created_date> |
|
||||||
<modified_user>-</modified_user> |
|
||||||
<modified_date>2022/06/27 14:59:09.135</modified_date> |
|
||||||
<parameters> |
|
||||||
<parameter> |
|
||||||
<name>Hochschule</name> |
|
||||||
<default_value>361</default_value> |
|
||||||
<description/> |
|
||||||
</parameter> |
|
||||||
<parameter> |
|
||||||
<name>Modus</name> |
|
||||||
<default_value>1</default_value> |
|
||||||
<description>2=Löschen und Hinzufügen oder nur 1=Hinzufügen</description> |
|
||||||
</parameter> |
|
||||||
<parameter> |
|
||||||
<name>PATH_TO_UPLOADFILE</name> |
|
||||||
<default_value>file:///home/superx/Downloads/Tabellenausgabe_Studierende_(amtlich_und_intern)-8.xlsx</default_value> |
|
||||||
<description>Pfad zur Exceldatei mit Quelldaten</description> |
|
||||||
</parameter> |
|
||||||
</parameters> |
|
||||||
<slaveservers> |
|
||||||
</slaveservers> |
|
||||||
<job-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<size_limit_lines/> |
|
||||||
<interval/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_JOB</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_JOB</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>JOBNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>JOBNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STATUS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STATUS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_READ</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_READ</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_WRITTEN</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_WRITTEN</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_UPDATED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_UPDATED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_INPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_INPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_OUTPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_OUTPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_REJECTED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_REJECTED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ERRORS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ERRORS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>STARTDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STARTDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ENDDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ENDDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOGDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOGDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>DEPDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>DEPDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>REPLAYDATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>REPLAYDATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_FIELD</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_FIELD</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>EXECUTING_SERVER</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>EXECUTING_SERVER</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>EXECUTING_USER</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>EXECUTING_USER</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>START_JOB_ENTRY</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>START_JOB_ENTRY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CLIENT</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>CLIENT</name> |
|
||||||
</field> |
|
||||||
</job-log-table> |
|
||||||
<jobentry-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>JOBNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>TRANSNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>JOBENTRYNAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>STEPNAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_READ</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_READ</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_WRITTEN</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_WRITTEN</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_UPDATED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_UPDATED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_INPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_INPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_OUTPUT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_OUTPUT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LINES_REJECTED</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LINES_REJECTED</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ERRORS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ERRORS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>RESULT</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>RESULT</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>NR_RESULT_ROWS</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>NR_RESULT_ROWS</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>NR_RESULT_FILES</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>NR_RESULT_FILES</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_FIELD</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>LOG_FIELD</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>COPY_NR</id> |
|
||||||
<enabled>N</enabled> |
|
||||||
<name>COPY_NR</name> |
|
||||||
</field> |
|
||||||
</jobentry-log-table> |
|
||||||
<channel-log-table> |
|
||||||
<connection/> |
|
||||||
<schema/> |
|
||||||
<table/> |
|
||||||
<timeout_days/> |
|
||||||
<field> |
|
||||||
<id>ID_BATCH</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ID_BATCH</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOG_DATE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOG_DATE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>LOGGING_OBJECT_TYPE</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>LOGGING_OBJECT_TYPE</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_NAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_NAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_COPY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_COPY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>REPOSITORY_DIRECTORY</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>REPOSITORY_DIRECTORY</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>FILENAME</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>FILENAME</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>OBJECT_REVISION</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>OBJECT_REVISION</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>PARENT_CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>PARENT_CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
<field> |
|
||||||
<id>ROOT_CHANNEL_ID</id> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<name>ROOT_CHANNEL_ID</name> |
|
||||||
</field> |
|
||||||
</channel-log-table> |
|
||||||
<pass_batchid>N</pass_batchid> |
|
||||||
<shared_objects_file/> |
|
||||||
<entries> |
|
||||||
<entry> |
|
||||||
<name>START</name> |
|
||||||
<description/> |
|
||||||
<type>SPECIAL</type> |
|
||||||
<start>Y</start> |
|
||||||
<dummy>N</dummy> |
|
||||||
<repeat>N</repeat> |
|
||||||
<schedulerType>0</schedulerType> |
|
||||||
<intervalSeconds>0</intervalSeconds> |
|
||||||
<intervalMinutes>60</intervalMinutes> |
|
||||||
<hour>12</hour> |
|
||||||
<minutes>0</minutes> |
|
||||||
<weekDay>1</weekDay> |
|
||||||
<DayOfMonth>1</DayOfMonth> |
|
||||||
<parallel>N</parallel> |
|
||||||
<draw>Y</draw> |
|
||||||
<nr>0</nr> |
|
||||||
<xloc>64</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
</entry> |
|
||||||
<entry> |
|
||||||
<name>tmp_stip_meldung</name> |
|
||||||
<description/> |
|
||||||
<type>SQL</type> |
|
||||||
<sql>drop table if exists tmp_stip_meldung;

create table tmp_stip_meldung
(
 matrikel_nr varchar(255),
 foerdermonat float,
 bafoeg char(1),
 userinfo_id integer,
 zeitstempel timestamp
)
;</sql> |
|
||||||
<useVariableSubstitution>F</useVariableSubstitution> |
|
||||||
<sqlfromfile>F</sqlfromfile> |
|
||||||
<sqlfilename/> |
|
||||||
<sendOneStatement>F</sendOneStatement> |
|
||||||
<connection>eduetl</connection> |
|
||||||
<parallel>N</parallel> |
|
||||||
<draw>Y</draw> |
|
||||||
<nr>0</nr> |
|
||||||
<xloc>208</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
</entry> |
|
||||||
<entry> |
|
||||||
<name>excel_into_stip_meldung</name> |
|
||||||
<description/> |
|
||||||
<type>TRANS</type> |
|
||||||
<specification_method>filename</specification_method> |
|
||||||
<trans_object_id/> |
|
||||||
<filename>${Internal.Job.Filename.Directory}/excel_into_stip_meldung.ktr</filename> |
|
||||||
<transname/> |
|
||||||
<arg_from_previous>N</arg_from_previous> |
|
||||||
<params_from_previous>N</params_from_previous> |
|
||||||
<exec_per_row>N</exec_per_row> |
|
||||||
<clear_rows>N</clear_rows> |
|
||||||
<clear_files>N</clear_files> |
|
||||||
<set_logfile>N</set_logfile> |
|
||||||
<logfile/> |
|
||||||
<logext/> |
|
||||||
<add_date>N</add_date> |
|
||||||
<add_time>N</add_time> |
|
||||||
<loglevel>Basic</loglevel> |
|
||||||
<cluster>N</cluster> |
|
||||||
<slave_server_name/> |
|
||||||
<set_append_logfile>N</set_append_logfile> |
|
||||||
<wait_until_finished>Y</wait_until_finished> |
|
||||||
<follow_abort_remote>N</follow_abort_remote> |
|
||||||
<create_parent_folder>N</create_parent_folder> |
|
||||||
<logging_remote_work>N</logging_remote_work> |
|
||||||
<parameters> |
|
||||||
<pass_all_parameters>Y</pass_all_parameters> |
|
||||||
</parameters> |
|
||||||
<parallel>N</parallel> |
|
||||||
<draw>Y</draw> |
|
||||||
<nr>0</nr> |
|
||||||
<xloc>448</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
</entry> |
|
||||||
<entry> |
|
||||||
<name>Success</name> |
|
||||||
<description/> |
|
||||||
<type>SUCCESS</type> |
|
||||||
<parallel>N</parallel> |
|
||||||
<draw>Y</draw> |
|
||||||
<nr>0</nr> |
|
||||||
<xloc>976</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
</entry> |
|
||||||
<entry> |
|
||||||
<name>Update stip_meldung</name> |
|
||||||
<description/> |
|
||||||
<type>SQL</type> |
|
||||||
<sql/> |
|
||||||
<useVariableSubstitution>T</useVariableSubstitution> |
|
||||||
<sqlfromfile>T</sqlfromfile> |
|
||||||
<sqlfilename>${Internal.Job.Filename.Directory}/stip_meldung_fuellen.sql</sqlfilename> |
|
||||||
<sendOneStatement>F</sendOneStatement> |
|
||||||
<connection>eduetl</connection> |
|
||||||
<parallel>N</parallel> |
|
||||||
<draw>Y</draw> |
|
||||||
<nr>0</nr> |
|
||||||
<xloc>688</xloc> |
|
||||||
<yloc>112</yloc> |
|
||||||
</entry> |
|
||||||
</entries> |
|
||||||
<hops> |
|
||||||
<hop> |
|
||||||
<from>START</from> |
|
||||||
<to>tmp_stip_meldung</to> |
|
||||||
<from_nr>0</from_nr> |
|
||||||
<to_nr>0</to_nr> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<evaluation>Y</evaluation> |
|
||||||
<unconditional>Y</unconditional> |
|
||||||
</hop> |
|
||||||
<hop> |
|
||||||
<from>tmp_stip_meldung</from> |
|
||||||
<to>excel_into_stip_meldung</to> |
|
||||||
<from_nr>0</from_nr> |
|
||||||
<to_nr>0</to_nr> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<evaluation>Y</evaluation> |
|
||||||
<unconditional>N</unconditional> |
|
||||||
</hop> |
|
||||||
<hop> |
|
||||||
<from>Update stip_meldung</from> |
|
||||||
<to>Success</to> |
|
||||||
<from_nr>0</from_nr> |
|
||||||
<to_nr>0</to_nr> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<evaluation>Y</evaluation> |
|
||||||
<unconditional>N</unconditional> |
|
||||||
</hop> |
|
||||||
<hop> |
|
||||||
<from>excel_into_stip_meldung</from> |
|
||||||
<to>Update stip_meldung</to> |
|
||||||
<from_nr>0</from_nr> |
|
||||||
<to_nr>0</to_nr> |
|
||||||
<enabled>Y</enabled> |
|
||||||
<evaluation>Y</evaluation> |
|
||||||
<unconditional>N</unconditional> |
|
||||||
</hop> |
|
||||||
</hops> |
|
||||||
<notepads> |
|
||||||
</notepads> |
|
||||||
</job> |
|
||||||
@ -1,41 +0,0 @@ |
|||||||
--Freemarker Template |
|
||||||
--Achtung: Macro fügt Inhalte ein |
|
||||||
--Bitte nur Freemarker Variablen füllen |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sx_jobs_exists">select sp_table_exists('sx_jobs') from xdummy;</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#assign jobs = [ |
|
||||||
{"uniquename":"stip_meldung_upload", "caption":"Stipendiaten-Daten hochladen", "filepath":"rpta/etl/stip_meldung_upload/stip_meldung_upload.kjb","sachgebiete_id":330, |
|
||||||
"kenn_profil":"","hs_nr":"","modus_supported":1,"params":"", |
|
||||||
"check_sql":"select count(*) from stip_meldung"} |
|
||||||
] /> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Freemarker Magic |
|
||||||
<#if sx_jobs_exists=1> |
|
||||||
<#foreach job in jobs> |
|
||||||
delete from sx_jobs where uniquename='${job.uniquename}'; |
|
||||||
</#foreach> |
|
||||||
<#if SQLdialect='Postgres'> |
|
||||||
select sp_update_sequence('sx_jobs'); |
|
||||||
</#if> |
|
||||||
<#foreach job in jobs> |
|
||||||
insert into sx_jobs (uniquename,caption,filepath,sachgebiete_id,kenn_profil,hs_nr,modus_supported,params |
|
||||||
<#if SQLdialect='Postgres'>,check_sql |
|
||||||
</#if>) |
|
||||||
values ('${job.uniquename}','${job.caption}','${job.filepath}',${job.sachgebiete_id},<#if job.kenn_profil!="">${job.kenn_profil}<#else>null::integer</#if>, |
|
||||||
<#if job.hs_nr!="">${job.hs_nr}<#else>null::integer</#if>,${job.modus_supported},'${job.params}' |
|
||||||
<#if SQLdialect='Postgres'> |
|
||||||
,'${job.check_sql}' |
|
||||||
</#if> |
|
||||||
); |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
<#if SQLdialect='Postgres'> |
|
||||||
select sp_update_sequence('sx_jobs'); |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
@ -1,149 +0,0 @@ |
|||||||
--Freemarker Template |
|
||||||
<#include "SQL_lingua_franca"/> |
|
||||||
<#include "SuperX_general"/> |
|
||||||
-- |
|
||||||
--Autor D. Quathamer 2024 |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="column_layouts" type="hashsequence"><![CDATA[ |
|
||||||
select L.tid, |
|
||||||
L.uniquename, |
|
||||||
L.caption, |
|
||||||
L.whereclause, |
|
||||||
L.uniquename as target_tablename, |
|
||||||
R.uniquename as resultset_uniquename, |
|
||||||
'tmp_' || R.uniquename as resultset_tablename, |
|
||||||
R.fieldclause as resultset_fieldclause, |
|
||||||
R.joinclause as resultset_joinclause, |
|
||||||
R.whereclause as resultset_whereclause, |
|
||||||
R.systeminfo_id as resultset_systeminfo_id |
|
||||||
from rpta_resultset R, rpta_column_layout L |
|
||||||
where L.resultset_id=R.tid |
|
||||||
and L.is_virtual=0 |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
|
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[ |
|
||||||
SELECT L.tid as layout_id, |
|
||||||
C.srcfieldname, |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname, |
|
||||||
T.uniquename as coltype, |
|
||||||
C.is_aggregate, |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption, |
|
||||||
CL.is_visible, |
|
||||||
CL.visible_size as visible_width, |
|
||||||
(select F.sql_code from rpta_format_code F where F.tid=CL.format_code_id) as format_sql, |
|
||||||
C.col_function as colfunction, |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description |
|
||||||
FROM rpta_column_layout L, rpta_column2layout CL, rpta_column C, rpta_column_type T |
|
||||||
where L.tid=CL.layout_id |
|
||||||
and C.tid=CL.column_id |
|
||||||
and T.tid=C.column_type |
|
||||||
and L.is_virtual=0 |
|
||||||
order by CL.sortnr |
|
||||||
; |
|
||||||
]]></sqlvar> |
|
||||||
|
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if column_layouts?has_content> |
|
||||||
|
|
||||||
<#foreach column_layout in column_layouts> |
|
||||||
|
|
||||||
<#if columns?has_content> |
|
||||||
|
|
||||||
--zuerst resultset aufbauen: |
|
||||||
create temp table ${column_layout.resultset_tablename} as |
|
||||||
select ${column_layout.resultset_fieldclause} |
|
||||||
from ${column_layout.resultset_joinclause} |
|
||||||
where 1=1 |
|
||||||
<#if column_layout.resultset_whereclause != ""> |
|
||||||
${column_layout.resultset_whereclause} </#if> |
|
||||||
; |
|
||||||
|
|
||||||
--dann das Spaltenlayout |
|
||||||
select |
|
||||||
--zuerst die Basisdaten: |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#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}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
null::char(1) as dummycol |
|
||||||
into temp tmp_stud |
|
||||||
from ${column_layout.resultset_tablename} |
|
||||||
where 1=1 |
|
||||||
<#if column_layout.whereclause !=""> |
|
||||||
and ${column_layout.whereclause} |
|
||||||
</#if> |
|
||||||
; |
|
||||||
|
|
||||||
drop table if exists ${column_layout.target_tablename} ; |
|
||||||
|
|
||||||
<#assign index_clause="" /> |
|
||||||
|
|
||||||
--ergebnistabelle: |
|
||||||
create table ${column_layout.target_tablename} as select |
|
||||||
--zuerst die nicht-Aggregate: |
|
||||||
<#assign groupby=0 /> |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#if column.is_aggregate==0> |
|
||||||
<#assign groupby=groupby+1 /> |
|
||||||
${column.targetfieldname}, |
|
||||||
|
|
||||||
<#assign index_clause=index_clause+ " |
|
||||||
create index ix_${column_layout.target_tablename}_${groupby} on ${column_layout.target_tablename}(${column.targetfieldname});" /> |
|
||||||
</#if> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
--dann die Aggregate: |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn"> |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
null::char(1) as dummycol |
|
||||||
from tmp_stud |
|
||||||
where 1=1 |
|
||||||
<#if groupby !=0 > |
|
||||||
group by |
|
||||||
<#list 1..groupby as i>${i} |
|
||||||
<#if i != groupby> |
|
||||||
, |
|
||||||
</#if> |
|
||||||
</#list> |
|
||||||
</#if> |
|
||||||
|
|
||||||
; |
|
||||||
|
|
||||||
${index_clause} |
|
||||||
|
|
||||||
|
|
||||||
drop table if exists tmp_stud; |
|
||||||
drop table if exists tmp_gesamt; |
|
||||||
|
|
||||||
|
|
||||||
</#if> --wenn columns?has_content |
|
||||||
drop table ${column_layout.resultset_tablename}; |
|
||||||
</#foreach> -- Ende Schleife column_layouts |
|
||||||
</#if> --gibt es column_layouts |
|
||||||
|
|
||||||
@ -1,122 +0,0 @@ |
|||||||
--Freemarker Template |
|
||||||
<#include "SQL_lingua_franca"/> |
|
||||||
<#include "SuperX_general"/> |
|
||||||
-- |
|
||||||
--Autor D. Quathamer 2024 |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="basetables" type="hashsequence"><![CDATA[ |
|
||||||
SELECT distinct T.name, |
|
||||||
R.is_virtual, |
|
||||||
T.name as runtime_tablename, |
|
||||||
R.caption, |
|
||||||
R.uniquename, |
|
||||||
R.fieldclause, |
|
||||||
R.joinclause, |
|
||||||
R.whereclause, |
|
||||||
R.systeminfo_id |
|
||||||
from sx_tables T, rpta_resultset R |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="basetable_columns" type="hashsequence"><![CDATA[ |
|
||||||
SELECT distinct T.name as table_name, |
|
||||||
F.name, |
|
||||||
F.is_sum, |
|
||||||
R.uniquename as rpta_name |
|
||||||
from sx_tables T, rpta_resultset R , sx_fields F |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
and F.table_name=T.name |
|
||||||
order by F.is_sum,2,3 |
|
||||||
|
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_clauses" type="hashsequence"><![CDATA[ |
|
||||||
select distinct R.uniquename as rpta_uniquename, R.fieldclause, R.joinclause, R.whereclause from sx_tables T, rpta_resultset R |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
|
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if basetables?has_content> |
|
||||||
<#foreach basetable in basetables> |
|
||||||
|
|
||||||
|
|
||||||
<#if basetable.is_virtual==0> |
|
||||||
<#foreach rpta_clause in rpta_clauses> |
|
||||||
<#if rpta_clause.rpta_uniquename=basetable.uniquename> |
|
||||||
<#if rpta_clause.joinclause?exists && rpta_clause.joinclause !=''> |
|
||||||
<#assign sqlString = "select current_timestamp as creation_date, " + rpta_clause.fieldclause + " from " + rpta_clause.joinclause + " where 1=1 " + rpta_clause.whereclause /> |
|
||||||
<#else> |
|
||||||
|
|
||||||
<#assign sqlString = "select current_timestamp as creation_date, " + rpta_clause.fieldclause + " where 1=1 " + rpta_clause.whereclause /> |
|
||||||
|
|
||||||
</#if> |
|
||||||
|
|
||||||
drop table if exists ${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_${basetable.runtime_tablename} as |
|
||||||
${sqlString} |
|
||||||
; |
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
--Summierung: |
|
||||||
<#if basetable_columns?has_content> |
|
||||||
<#assign groupby=0 /> |
|
||||||
|
|
||||||
drop table if exists ${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
|
|
||||||
create table ${basetable.runtime_tablename} as |
|
||||||
select |
|
||||||
<#foreach basetable_column in basetable_columns> |
|
||||||
<#if basetable_column.rpta_name=basetable.uniquename> |
|
||||||
<#if basetable_column.is_sum=0> |
|
||||||
<#assign groupby=groupby+1 /> |
|
||||||
${basetable_column.name}, |
|
||||||
<#else> |
|
||||||
sum(${basetable_column.name})::float as ${basetable_column.name}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
creation_date |
|
||||||
from tmp_${basetable.runtime_tablename} |
|
||||||
group by |
|
||||||
<#list 1..groupby as i>${i}, |
|
||||||
</#list> |
|
||||||
creation_date |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
</#if> --Ende Summierung |
|
||||||
|
|
||||||
--TODO: indizes |
|
||||||
<#foreach basetable_column in basetable_columns> |
|
||||||
<#if basetable_column.rpta_name=basetable.uniquename> |
|
||||||
|
|
||||||
<#if basetable_column.is_sum=0> |
|
||||||
create index ix_${basetable.runtime_tablename}_${basetable_column.name} on ${basetable.runtime_tablename}(${basetable_column.name}); |
|
||||||
--create index ix_tid_stg_dashboard_mw on ${basetable.runtime_tablename}(tid_stg); |
|
||||||
--create index ix_sem_rueck_beur_ein_dashboard_mw on ${basetable.runtime_tablename}(sem_rueck_beur_ein); |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
</#if> --Ende is_virtual=0 |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</#if> |
|
||||||
@ -0,0 +1,28 @@ |
|||||||
|
48140^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_exam_unit_dim_studiengang'\ |
||||||
|
)\ |
||||||
|
order by sortnr, caption\ |
||||||
|
;^ ^<<SQL>>SELECT uniquename,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_exam_unit_dim_studiengang'\ |
||||||
|
) and uniquename='rpta_exam_unit_dim_studiengang_note';^ |
||||||
|
48141^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
||||||
|
48142^Fächer^30^0^0^130^200^6^char^1000^0^999^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
||||||
|
48143^Abschluss^40^0^0^100^200^3^char^1500^0^999^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
||||||
|
48144^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
||||||
|
48145^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^Eintrag^<<SQL>> select 2,'nur Wintersemester' from xdummy^ |
||||||
|
48146^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^999^hs_zugangsber^apnr, eintrag^ ^ |
||||||
|
48147^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
||||||
|
48148^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^999^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ |
||||||
|
48149^Studiengang^25^0^0^140^150^50^char^1000^0^999^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
||||||
|
48151^Stichtag^23^330^-1^130^100^1^sql^30^1^999^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^ |
||||||
|
48152^Hörerstatus^200^330^-1^140^150^1^sql^30^0^999^<<SQL>> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^ |
||||||
|
48158^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^999^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
||||||
|
48162^Geschlecht^110^0^0^140^80^1^integer^30^0^999^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
||||||
|
48163^Spalten^3001^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
||||||
|
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=<<Spaltenlayout>>) order by 2;^ ^ ^ |
||||||
|
48164^Fächer^30^0^0^130^200^6^char^1000^1^1^<<SQL>> select stg,dtxt from k_stg order by 2;^ ^ ^ |
||||||
@ -0,0 +1 @@ |
|||||||
|
48140^7^ |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
48140^48140^ |
||||||
|
48140^48141^ |
||||||
|
48140^48142^ |
||||||
|
48140^48143^ |
||||||
|
48140^48144^ |
||||||
|
48140^48145^ |
||||||
|
48140^48146^ |
||||||
|
48140^48147^ |
||||||
|
48140^48148^ |
||||||
|
48140^48149^ |
||||||
|
48140^48151^ |
||||||
|
48140^48152^ |
||||||
|
48140^48158^ |
||||||
|
48140^48162^ |
||||||
|
48140^48163^ |
||||||
|
48140^48164^ |
||||||
@ -0,0 +1,216 @@ |
|||||||
|
48140^Leistungen und Studiengänge (Makro)^--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 caption,\ |
||||||
|
uniquename,\ |
||||||
|
fieldclause,\ |
||||||
|
joinclause,\ |
||||||
|
whereclause,\ |
||||||
|
systeminfo_id\ |
||||||
|
from rpta_resultset\ |
||||||
|
where uniquename='${basetable.name}';\ |
||||||
|
\ |
||||||
|
]]></sqlvar>\ |
||||||
|
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
||||||
|
select L.uniquename,\ |
||||||
|
L.caption,\ |
||||||
|
L.whereclause\ |
||||||
|
from rpta_resultset R, rpta_column_layout L\ |
||||||
|
where L.resultset_id=R.tid\ |
||||||
|
and R.uniquename='${basetable.name}'\ |
||||||
|
and L.uniquename=<<Spaltenlayout>>;\ |
||||||
|
\ |
||||||
|
]]></sqlvar>\ |
||||||
|
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
||||||
|
SELECT C.srcfieldname,\ |
||||||
|
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
||||||
|
T.uniquename as coltype,\ |
||||||
|
C.is_aggregate,\ |
||||||
|
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
||||||
|
CL.is_visible,\ |
||||||
|
CL.visible_size as visible_width,\ |
||||||
|
(select F.sql_code from rpta_format_code F where F.tid=CL.format_code_id) as format_sql,\ |
||||||
|
C.col_function as colfunction,\ |
||||||
|
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
||||||
|
FROM rpta_column_layout L, rpta_column2layout CL, rpta_column C, rpta_column_type T\ |
||||||
|
where L.tid=CL.layout_id\ |
||||||
|
and C.tid=CL.column_id\ |
||||||
|
and T.tid=C.column_type\ |
||||||
|
and L.uniquename=<<Spaltenlayout>>\ |
||||||
|
/* and C.uniquename in (<<Spalten>>) */\ |
||||||
|
order by CL.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>\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
select \ |
||||||
|
--zuerst die Basisdaten:\ |
||||||
|
<#foreach column in columns>\ |
||||||
|
<#if column.coltype="physicalColumn">\ |
||||||
|
${column.srcfieldname} as ${column.srcfieldname},\ |
||||||
|
<#elseif column.coltype="logicalColumn">\ |
||||||
|
${column.colfunction} as ${column.targetfieldname},\ |
||||||
|
<#elseif column.coltype="lookupColumn">\ |
||||||
|
(${column.colfunction}) as ${column.targetfieldname},\ |
||||||
|
<#elseif column.coltype="computedColumn" || column.coltype=="processingColumn">\ |
||||||
|
null::decimal(19,6) as ${column.targetfieldname},\ |
||||||
|
</#if>\ |
||||||
|
</#foreach>\ |
||||||
|
null::char(1) as dummycol\ |
||||||
|
into temp tmp_stud\ |
||||||
|
from ${basetable.runtime_tablename}\ |
||||||
|
<#if rpta_column_layout.whereclause !="">\ |
||||||
|
where ${rpta_column_layout.whereclause}\ |
||||||
|
</#if>\ |
||||||
|
;\ |
||||||
|
\ |
||||||
|
--ergebnistabelle:\ |
||||||
|
select \ |
||||||
|
--zuerst die nicht-Aggregate:\ |
||||||
|
<#assign groupby=0 />\ |
||||||
|
<#foreach column in columns>\ |
||||||
|
-- logicalColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
||||||
|
-- computedColumns immer mitnehmen, da später verarbeitet\ |
||||||
|
<#if column.is_aggregate==0 && column.coltype!="logicalColumn" && column.coltype!="processingColumn" || column.coltype="computedColumn"> \ |
||||||
|
<#assign groupby=groupby+1 />\ |
||||||
|
${column.targetfieldname},\ |
||||||
|
<#elseif column.is_aggregate==0 && column.coltype="processingColumn"> \ |
||||||
|
<#assign groupby=groupby+1 />\ |
||||||
|
${column.srcfieldname} as ${column.targetfieldname},\ |
||||||
|
</#if>\ |
||||||
|
</#foreach>\ |
||||||
|
--dann die Aggregate:\ |
||||||
|
<#foreach column in columns>\ |
||||||
|
-- logicalColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
||||||
|
-- computedColumns ausgeschlossen, da später im finalen select verarbeitet\ |
||||||
|
<#if column.is_aggregate==1 && column.coltype!="computedColumn" && column.coltype!="logicalColumn"> \ |
||||||
|
${column.colfunction}(${column.srcfieldname}) as ${column.targetfieldname},\ |
||||||
|
</#if>\ |
||||||
|
</#foreach>\ |
||||||
|
null::char(1) as dummycol\ |
||||||
|
into temp tmp_stud2\ |
||||||
|
from tmp_stud\ |
||||||
|
where 1=1\ |
||||||
|
/* ${<<Zusatzfilter>>} */\ |
||||||
|
group by\ |
||||||
|
<#list 1..groupby as i>${i}\ |
||||||
|
<#if i != groupby>\ |
||||||
|
,\ |
||||||
|
</#if>\ |
||||||
|
</#list>\ |
||||||
|
;\ |
||||||
|
--für Prozentwerte alle Aggregate summieren:\ |
||||||
|
select <#foreach column in columns>\ |
||||||
|
<#if column.is_aggregate==1 && column.coltype!="computedColumn" && column.coltype!="processingColumn">\ |
||||||
|
sum(${column.targetfieldname})::float as ${column.targetfieldname},\ |
||||||
|
</#if>\ |
||||||
|
</#foreach>\ |
||||||
|
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 />\ |
||||||
|
</#if>\ |
||||||
|
</#foreach>\ |
||||||
|
<#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>\ |
||||||
|
\ |
||||||
|
<#if column.coltype=="computedColumn">\ |
||||||
|
(${column.colfunction})${format_sql} as ${column.targetfieldname}\ |
||||||
|
<#else>\ |
||||||
|
${column.targetfieldname}${format_sql} as ${column.targetfieldname}\ |
||||||
|
</#if>\ |
||||||
|
\ |
||||||
|
<#if colnr < number_of_visible_colums>,</#if>\ |
||||||
|
</#if> --wenn sichtbar\ |
||||||
|
</#foreach>\ |
||||||
|
from tmp_stud2\ |
||||||
|
order by <#list 1..number_of_visible_colums as i>${i}\ |
||||||
|
<#if i != number_of_visible_colums>\ |
||||||
|
,\ |
||||||
|
</#if>\ |
||||||
|
</#list>\ |
||||||
|
;\ |
||||||
|
<#if basetable.is_virtual==1>\ |
||||||
|
drop table if exists ${basetable.runtime_tablename};\ |
||||||
|
</#if>\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
drop table if exists tmp_stud;\ |
||||||
|
drop table if exists tmp_stud2;\ |
||||||
|
drop table if exists tmp_gesamt;\ |
||||||
|
\ |
||||||
|
\ |
||||||
|
</#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^Makrobericht zur Ausgabe nach Fächern^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
||||||
@ -0,0 +1 @@ |
|||||||
|
16^48140^ |
||||||
@ -1,16 +0,0 @@ |
|||||||
48150^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^hidden^^ |
|
||||||
48151^Spaltenlayout^10^0^0^150^80^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_layout where 1=1 /* and resultset_id=<<Virtuelle Tabelle>> */ order by 2;^hidden^^ |
|
||||||
48152^Spaltenlayouts verwalten^110^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^ |
|
||||||
48153^Name^20^0^0^150^150^1^char^50^0^0^^^^ |
|
||||||
48154^Schlüssel^30^0^0^150^200^1^char^200^0^0^ ^ ^^ |
|
||||||
48155^Virtuelle Tabellen bearbeiten^100^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_resultset_list.jsp' from xdummy;^ |
|
||||||
48156^Virtuelle Tabelle^5^0^0^150^200^1^integer^200^1^1^<<SQL>> select tid,caption from rpta_resultset where 1=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^ |
|
||||||
48157^Spaltentyp^200^0^0^150^200^1^integer^200^1^1^<<SQL>> select tid,caption from rpta_column_type order by 2;^^<<SQL>> select tid,caption from rpta_column_type\ |
|
||||||
where uniquename='physicalColumn'^ |
|
||||||
48158^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^ ^^ |
|
||||||
48159^Quellfeld^7^0^0^150^200^1^char^200^0^1^<<SQL>> select F.name,coalesce(trim(F.caption),'Feld') || ' (' || trim(F.name) || ')' \ |
|
||||||
from sx_fields F, rpta_resultset R\ |
|
||||||
where F.table_name=R.uniquename\ |
|
||||||
/* and R.tid=<<Virtuelle Tabelle>> */\ |
|
||||||
and currentlyused=1\ |
|
||||||
order by 1^ ^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48150^330^ |
|
||||||
@ -1,10 +0,0 @@ |
|||||||
48150^48150^ |
|
||||||
48150^48151^ |
|
||||||
48150^48152^ |
|
||||||
48150^48153^ |
|
||||||
48150^48154^ |
|
||||||
48150^48155^ |
|
||||||
48150^48156^ |
|
||||||
48150^48157^ |
|
||||||
48150^48158^ |
|
||||||
48150^48159^ |
|
||||||
@ -1,122 +0,0 @@ |
|||||||
48150^Spalte anlegen^--Autor: D. Quathamer\ |
|
||||||
--Datum: 15.3.2024\ |
|
||||||
--freemarker template\ |
|
||||||
\ |
|
||||||
create temp table tmp_rpta_column (\ |
|
||||||
ord smallint,\ |
|
||||||
tid INTEGER , \ |
|
||||||
uniquename varchar(255),\ |
|
||||||
caption varchar(255),\ |
|
||||||
srcfieldname varchar(255),\ |
|
||||||
column_type integer,\ |
|
||||||
column_type_str varchar(255),\ |
|
||||||
column_type_uniquename varchar(255),\ |
|
||||||
col_function text,\ |
|
||||||
is_aggregate smallint,\ |
|
||||||
resultset_id integer,\ |
|
||||||
resultset_str varchar(255),\ |
|
||||||
systeminfo_str varchar(255),\ |
|
||||||
custom integer ,\ |
|
||||||
description text,\ |
|
||||||
targetfieldname varchar(255),\ |
|
||||||
nextedit varchar(255)\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
begin work;\ |
|
||||||
\ |
|
||||||
insert into tmp_rpta_column (--ord,\ |
|
||||||
-- tid,\ |
|
||||||
-- uniquename,\ |
|
||||||
-- caption,\ |
|
||||||
-- srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
column_type_str,\ |
|
||||||
column_type_uniquename,\ |
|
||||||
-- col_function,\ |
|
||||||
-- is_aggregate,\ |
|
||||||
resultset_id\ |
|
||||||
-- custom,\ |
|
||||||
-- description,\ |
|
||||||
-- targetfieldname,\ |
|
||||||
-- nextedit\ |
|
||||||
) \ |
|
||||||
select \ |
|
||||||
T.tid,\ |
|
||||||
T.caption as column_type_str,\ |
|
||||||
T.uniquename as column_type_uniquename,\ |
|
||||||
<<Virtuelle Tabelle>> as resultset_id\ |
|
||||||
FROM rpta_column_type T \ |
|
||||||
where T.tid=<<Spaltentyp>> \ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set resultset_str=R.caption\ |
|
||||||
from rpta_resultset R\ |
|
||||||
where R.tid=tmp_rpta_column.resultset_id;\ |
|
||||||
\ |
|
||||||
/*update tmp_rpta_column set srcfieldname=F.name,\ |
|
||||||
is_aggregate=F.is_sum,\ |
|
||||||
uniquename=F.name,\ |
|
||||||
caption=F.caption\ |
|
||||||
from sx_fields F, rpta_resultset R\ |
|
||||||
where F.table_name=R.uniquename\ |
|
||||||
and R.tid=tmp_rpta_column.resultset_id\ |
|
||||||
and F.name=<<Quellfeld>>\ |
|
||||||
and tmp_rpta_column.column_type_uniquename='physicalColumn'; */\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
/* update tmp_rpta_column set uniquename=<<Schlüssel>>; */\ |
|
||||||
/* update tmp_rpta_column set caption=<<Name>>;*/\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set uniquename='Created ' || timestamp_str(now())\ |
|
||||||
where uniquename is null;\ |
|
||||||
update tmp_rpta_column set caption='Created ' || timestamp_str(now())\ |
|
||||||
where caption is null;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select sp_update_sequence('rpta_column');\ |
|
||||||
\ |
|
||||||
insert into rpta_column( uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
resultset_id,\ |
|
||||||
custom,\ |
|
||||||
description,\ |
|
||||||
targetfieldname)\ |
|
||||||
select uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
resultset_id,\ |
|
||||||
custom,\ |
|
||||||
description,\ |
|
||||||
targetfieldname\ |
|
||||||
from tmp_rpta_column;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set tid=currval('rpta_column_tid_seq');\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
commit;\ |
|
||||||
\ |
|
||||||
select 'Ergebnis' as s1, \ |
|
||||||
' Eintrag angelegt:' || coalesce(C.caption,'Unbenannt') || ' (' || coalesce(C.uniquename,'TID: ' || C.tid::varchar) || ') [' || C.column_type_str || ']' as ergebnis2,\ |
|
||||||
'../edit/rpta/rpta_column_edit.jsp|tid=' || C.tid as nextedit\ |
|
||||||
from tmp_rpta_column C\ |
|
||||||
;^XIL List\ |
|
||||||
drop_and_delete movable_columns sizable_columns horizontal_scrolling\ |
|
||||||
white_space_color=COLOR_WHITE fixed_columns=2\ |
|
||||||
min_heading_height=35\ |
|
||||||
Column CID=0 heading_text="Ergebnis" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=0 heading_text="Spalte" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=1 heading_text="Bearbeiten" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=5 text_size=200\ |
|
||||||
@@@^^^Spaltendefinitionen anlegen^drop table tmp_rpta_column;^^1^440^360^0^1^ ^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
331^48150^ |
|
||||||
@ -1,35 +0,0 @@ |
|||||||
48180^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
and is_virtual=0\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ ^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
and is_virtual=0\ |
|
||||||
order by sortnr, caption\ |
|
||||||
limit 1^ |
|
||||||
48181^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48182^Fächer^30^0^0^130^200^6^integer^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48183^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
|
||||||
48184^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
|
||||||
48185^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^ ^<<SQL>> select 2,'nur Wintersemester' from xdummy^ |
|
||||||
48186^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^ ^ ^ |
|
||||||
48187^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48188^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48189^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48190^Semester^100^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^hidden^ ^ |
|
||||||
48191^Stichtag^23^330^-1^130^100^1^sql^30^0^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^hidden^ ^ |
|
||||||
48192^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^ ^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^ |
|
||||||
48193^Jahr^110^0^0^140^80^1^integer^30^0^13^^ ^ ^ |
|
||||||
48194^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<<SQL>> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^ ^ ^ |
|
||||||
48195^Nur Endsemester^21^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^ |
|
||||||
48198^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
|
||||||
48202^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
|
||||||
48203^Spalten^3001^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
|
||||||
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=<<Spaltenlayout>>) order by 2;^ ^ ^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48180^7^ |
|
||||||
@ -1,19 +0,0 @@ |
|||||||
48180^48180^ |
|
||||||
48180^48181^ |
|
||||||
48180^48182^ |
|
||||||
48180^48183^ |
|
||||||
48180^48184^ |
|
||||||
48180^48185^ |
|
||||||
48180^48186^ |
|
||||||
48180^48187^ |
|
||||||
48180^48188^ |
|
||||||
48180^48189^ |
|
||||||
48180^48190^ |
|
||||||
48180^48191^ |
|
||||||
48180^48192^ |
|
||||||
48180^48193^ |
|
||||||
48180^48194^ |
|
||||||
48180^48195^ |
|
||||||
48180^48198^ |
|
||||||
48180^48202^ |
|
||||||
48180^48203^ |
|
||||||
@ -1,274 +0,0 @@ |
|||||||
48180^Tabellenausgabe Studierende (amtlich und intern) (optimiert)^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="column_layout" type="hash"><![CDATA[\ |
|
||||||
select R.uniquename as resultset_uniquename,\ |
|
||||||
L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
L.is_virtual\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
<#if column_layout.is_virtual==1>\ |
|
||||||
SELECT distinct T.name,\ |
|
||||||
1::smallint as is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
from sx_tables T, rpta_resultset R \ |
|
||||||
where T.name=R.uniquename\ |
|
||||||
and T.name='${column_layout.resultset_uniquename}'\ |
|
||||||
<#else> \ |
|
||||||
select L.uniquename,\ |
|
||||||
L.is_virtual,\ |
|
||||||
L.uniquename as runtime_tablename\ |
|
||||||
from rpta_column_layout L where L.uniquename='${column_layout.uniquename}'\ |
|
||||||
;\ |
|
||||||
</#if>\ |
|
||||||
]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
||||||
select caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.runtime_tablename}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign jahr_param="" />\ |
|
||||||
<#assign jahr_filter="1=1" />\ |
|
||||||
/* <#assign jahr_param="<<Jahr>>" /> */\ |
|
||||||
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\ |
|
||||||
<#if jahr_param !="">\ |
|
||||||
<#assign jahr_filter="(" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + " or "/>\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign semester_filter ="1=1\ |
|
||||||
/* and sem_rueck_beur_ein >= <<Seit Semester>> */\ |
|
||||||
/* and sem_rueck_beur_ein <= <<Bis Semester>> */\ |
|
||||||
" />\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
<#assign semester_filter = semester_filter+ " and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>'" />\ |
|
||||||
</#if>\ |
|
||||||
<#if "<<Nur Endsemester>>"="1">\ |
|
||||||
--nur Endsemester\ |
|
||||||
<#assign semester_filter = semester_filter+ " and 1=1 and sem_rueck_beur_ein = "+endsemester /> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if basetable.is_virtual==1>\ |
|
||||||
\ |
|
||||||
<#assign filter="<<Köpfe oder Fälle ?>>\ |
|
||||||
/* and sem_rueck_beur_ein = <<Semester>> */\ |
|
||||||
/* and stichtag = <<Stichtag>> */\ |
|
||||||
/* and <<Hochschulzugangsberechtigung>> */\ |
|
||||||
/* and <<Hörerstatus>>*/\ |
|
||||||
/* and abschluss in (<<Abschluss>>) */\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
/* and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and ${<<Filter Studierende>>} */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
<#else>\ |
|
||||||
<#assign filter="1=1" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + jahr_filter />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + semester_filter />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
||||||
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<<Fächer>> */\ |
|
||||||
\ |
|
||||||
<#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}\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
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},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_rs\ |
|
||||||
from ${basetable.runtime_tablename}\ |
|
||||||
where 1=1\ |
|
||||||
<#if rpta_column_layout.whereclause !="">\ |
|
||||||
and ${rpta_column_layout.whereclause}\ |
|
||||||
</#if>\ |
|
||||||
<#if rpta_column_layout.is_virtual ==0>\ |
|
||||||
and ${filter}\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
<#else>\ |
|
||||||
--wenn column_layout.is_virtual=0,\ |
|
||||||
--also die Tabelle ist schon da:\ |
|
||||||
<#assign groupby=0 />\ |
|
||||||
\ |
|
||||||
select <#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="computedColumn">\ |
|
||||||
null::float as ${column.targetfieldname},\ |
|
||||||
<#elseif column.is_visible==1>\ |
|
||||||
<#assign groupby=groupby+1 />\ |
|
||||||
${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_rs\ |
|
||||||
from ${basetable.runtime_tablename}\ |
|
||||||
where ${filter}\ |
|
||||||
<#if groupby !=0 >\ |
|
||||||
group by\ |
|
||||||
<#list 1..groupby as i>${i}\ |
|
||||||
<#if i != groupby>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
</#if>\ |
|
||||||
--ergebnistabelle:\ |
|
||||||
select \ |
|
||||||
--die Aggregate:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_gesamt\ |
|
||||||
from tmp_rs\ |
|
||||||
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 />\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
<#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>\ |
|
||||||
\ |
|
||||||
<#if column.coltype=="computedColumn">\ |
|
||||||
(${column.colfunction})${format_sql} as ${column.targetfieldname}\ |
|
||||||
<#else>\ |
|
||||||
${column.targetfieldname}${format_sql} as ${column.targetfieldname}\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if colnr < number_of_visible_colums>,</#if>\ |
|
||||||
</#if> --wenn sichtbar\ |
|
||||||
</#foreach>\ |
|
||||||
from tmp_rs\ |
|
||||||
order by <#list 1..number_of_visible_colums as i>${i}\ |
|
||||||
<#if i != number_of_visible_colums>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
;\ |
|
||||||
<#if basetable.is_virtual==1>\ |
|
||||||
drop table if exists ${basetable.runtime_tablename};\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
drop table if exists tmp_rs;\ |
|
||||||
drop table if exists tmp_gesamt;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
16^48180^ |
|
||||||
@ -1,39 +0,0 @@ |
|||||||
48220^Studiengang^39^0^0^150^200^6^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('MAN-STG-Kostenstellen-Sicht','MAN-Studiengang-Sicht') and aktiv=1 order by 3,2;^^^ |
|
||||||
48221^Kennzahl^100^0^0^150^200^1^char^255^0^1^<<SQL>> select C.id,trim(C.name) || ' - (' || C.id || ')',P.sortnr,P.sortnr2\ |
|
||||||
from man_reports R,man_catalogue_rpt P, man_catalogue C\ |
|
||||||
where C.id=P.catalogue_id\ |
|
||||||
and R.id=P.report_id\ |
|
||||||
/* and P.report_id=<<Bericht>>*/\ |
|
||||||
and P.active>=1\ |
|
||||||
and R.active=1\ |
|
||||||
--and C.timeunit='S'\ |
|
||||||
--and C.calcratio=0\ |
|
||||||
--and C.cacheing>0\ |
|
||||||
order by 3,4,2^ ^ ^ |
|
||||||
48222^Institution^2^0^0^150^200^1^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='MAN-Kostenstellen-Sicht' and aktiv=1 order by type,name;^^^ |
|
||||||
48223^Start-Jahr^4^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct tid,druck FROM man_jahr order by 1;^^<<SQL>> SELECT tid,druck FROM man_jahr where tid=(year(today())-5) ;^ |
|
||||||
48224^Startsemester^7^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^^^ |
|
||||||
48225^tablestylesheet^121^0^0^100^200^1^char^200^0^13^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430^hidden^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430 and S.ord=1^ |
|
||||||
48226^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_man_kennz_aggr'\ |
|
||||||
and R.systeminfo_id=200)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ ^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_man_kennz_aggr'\ |
|
||||||
and R.systeminfo_id=200) and uniquename='man_kennz_aggr_tuhh_behoerdenbericht';^ |
|
||||||
48227^Spalten^3001^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
|
||||||
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=<<Spaltenlayout>>) order by 2;^^^ |
|
||||||
48228^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^hidden^<<SQL>> select 1,'Ja' from xdummy^ |
|
||||||
48229^Ausgabeformat^2001^0^0^100^150^1^char^200^0^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';^ |
|
||||||
48230^Endsemester^8^0^0^140^100^1^integer^30^0^1^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^^^ |
|
||||||
48231^End-Jahr^5^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct tid,druck FROM man_jahr order by 1;^^<<SQL>> SELECT tid,druck FROM man_jahr where tid=(year(today())-1) ;^ |
|
||||||
48232^Zeitraumtyp^110^0^0^100^150^1^char^30^1^1^<<SQL>> select 'S', 'Semester' from xdummy union select 'J', 'Jahr' from xdummy^hidden^<<SQL>> select 'S', 'Semester' from xdummy^ |
|
||||||
48233^Bericht^1^0^0^150^200^1^char^30^1^1^<<SQL>> select R.id,trim(R.name) || ' - (' || R.id || ')' from man_reports R where 0<(select count(*) from man_catalogue_rpt P, man_catalogue C\ |
|
||||||
where C.id=P.catalogue_id\ |
|
||||||
and C.fromclause is not null\ |
|
||||||
and P.report_id=R.id) and R.active=1 order by 2^ ^<<SQL>> select id,name || ' - (' || id || ')' from man_reports where id='TUHH_KENNZ' and active=1;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48220^200^ |
|
||||||
@ -1,14 +0,0 @@ |
|||||||
48220^48220^ |
|
||||||
48220^48221^ |
|
||||||
48220^48222^ |
|
||||||
48220^48223^ |
|
||||||
48220^48224^ |
|
||||||
48220^48225^ |
|
||||||
48220^48226^ |
|
||||||
48220^48227^ |
|
||||||
48220^48228^ |
|
||||||
48220^48229^ |
|
||||||
48220^48230^ |
|
||||||
48220^48231^ |
|
||||||
48220^48232^ |
|
||||||
48220^48233^ |
|
||||||
@ -1,166 +0,0 @@ |
|||||||
48220^Management-Bericht Kennzahlen^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
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 caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Startsemester>> */\ |
|
||||||
/* and tid <= <<Endsemester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign jahr_param="" />\ |
|
||||||
<#assign jahr_filter="1=1" />\ |
|
||||||
/* <#assign jahr_param="<<Jahr>>" /> */\ |
|
||||||
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\ |
|
||||||
<#if jahr_param !="">\ |
|
||||||
<#assign jahr_filter="(" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + " or "/>\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter="1=1\ |
|
||||||
/* and geschlecht=<<Geschlecht>> */\ |
|
||||||
/* and catalogue_id=<<Kennzahl>> */ \ |
|
||||||
/* and sem >= <<Startsemester>> */\ |
|
||||||
/* and sem <= <<Endsemester>> */\ |
|
||||||
/* and jahr >= <<Start-Jahr>> */\ |
|
||||||
/* and jahr <= <<End-Jahr>> */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign institutionparam="" />\ |
|
||||||
/* <#assign institutionparam=<<Institution>> /> */\ |
|
||||||
<#assign studiengangparam="" />\ |
|
||||||
/* <#assign studiengangparam="<<Studiengang>>" /> */\ |
|
||||||
\ |
|
||||||
--Rechte prüfen:\ |
|
||||||
--SQL Fehler () abfangen:\ |
|
||||||
<#assign instRechteList=Institution.allNeededKeysList />\ |
|
||||||
<#assign studiengangRechteList=Studiengang.allNeededKeysList />\ |
|
||||||
<#if instRechteList=="()">\ |
|
||||||
<#assign instRechteList="('-9xy!')" />\ |
|
||||||
</#if>\ |
|
||||||
<#if studiengangRechteList=="()">\ |
|
||||||
<#assign studiengangRechteList="('-9xy!')" />\ |
|
||||||
</#if>\ |
|
||||||
--zuerst Rechte prüfen:\ |
|
||||||
<#assign filter = filter + " and (1!=1 or ch110_institut in "+instRechteList+" or studiengang in "+studiengangRechteList+" )" />\ |
|
||||||
--jetzt Selektion Inst/Studiengang mit höherer Priorität: \ |
|
||||||
<#if institutionparam !="" && institutionparam !="'root'">\ |
|
||||||
<#assign filter = filter + " and ch110_institut in "+.vars["Institution"].allNeededKeys /> \ |
|
||||||
</#if>\ |
|
||||||
/* <#assign filter = filter + " and studiengang in "+.vars["Studiengang"].allNeededKeys /> --<<Studiengang>>*/ \ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#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=filter/>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
@@@^^^Übersicht über vorberechnete Kennzahlen^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^1^600^360^0^^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
200^48220^ |
|
||||||
@ -1,30 +0,0 @@ |
|||||||
48250^Beschäftigungsstelle (Person)^1^0^0^200^150^1^char^30^0^12^<<SQL>>select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Besch./Kostenstellen-Sicht') and aktiv=1 order by sortnr,type,name;^^^ |
|
||||||
48251^Datum^0^350^-1^150^80^1^date^10^1^0^^^<<SQL>> select today() from xdummy^ |
|
||||||
48252^Vertragsart^10^380^-1^200^160^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA-Vertragsart-Sicht' and aktiv=1 order by type,name;^^^ |
|
||||||
48253^Spalten^3001^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
|
||||||
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 tid=<<Spaltenlayout>>) order by 2;^^^ |
|
||||||
48254^Geschlecht^81^310^-1^100^70^1^integer^4^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^^^ |
|
||||||
48255^Personal-Nr.^50^350^-1^150^80^1^integer^10^0^0^^^^ |
|
||||||
48256^Amtsbezeichnung^55^0^0^150^160^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Amtsdienstbez.' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48257^Filter Personal^120^310^-1^100^300^1^sql^20^0^1^<<SQL>> select id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SVA_PERS_FILTER' order by 2;^^^ |
|
||||||
48258^Kostenstelle (Person)^70^350^-1^150^150^1^char^30^0^12^<<SQL>> select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Kostenstellen-Sicht','SVA-Kst-spezial') and aktiv=1 order by sortnr,type,name;^hidden^^ |
|
||||||
48259^Alter (bis)^21^170^-1^100^70^1^integer^5^0^0^^^^ |
|
||||||
48260^Spaltenlayout^3000^350^-1^140^180^1^integer^50^1^1^<<SQL>>SELECT tid,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sva_pbv_aggr_pgd'\ |
|
||||||
and R.systeminfo_id=6)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^^<<SQL>>SELECT tid,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sva_pbv_aggr_pgd'\ |
|
||||||
and R.systeminfo_id=6)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
limit 1 \ |
|
||||||
;^ |
|
||||||
48262^Dienstart^3^350^-1^150^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Dienstart' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48264^BVL-Gruppe^80^350^-1^150^120^10^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA BVL-Gruppen' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48267^Personalkategorie^310^0^0^100^200^3^char^30^0^1^<<SQL>> select id,caption from sx_repository where art='SVA_PERSONALKATEGORIE' and aktiv=1 and gueltig_seit<=date_val(<<Datum>>) and gueltig_bis>=date_val(<<Datum>>) order by sort1^hidden^^ |
|
||||||
48269^Alter (von)^20^0^0^80^70^1^integer^4^0^0^^^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48250^6^ |
|
||||||
@ -1,15 +0,0 @@ |
|||||||
48250^48250^ |
|
||||||
48250^48251^ |
|
||||||
48250^48252^ |
|
||||||
48250^48253^ |
|
||||||
48250^48254^ |
|
||||||
48250^48255^ |
|
||||||
48250^48256^ |
|
||||||
48250^48257^ |
|
||||||
48250^48258^ |
|
||||||
48250^48259^ |
|
||||||
48250^48260^ |
|
||||||
48250^48262^ |
|
||||||
48250^48264^ |
|
||||||
48250^48267^ |
|
||||||
48250^48269^ |
|
||||||
@ -1,124 +0,0 @@ |
|||||||
48250^Beschäftigungsverhältnisse^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
<#assign my_base_rs='sva_pbv_aggr_pgd' />\ |
|
||||||
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 caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.tid=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.tid=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign filter="sva_pbv_aggr.d_besch_von <= date_val(<<Datum>>) \ |
|
||||||
and sva_pbv_aggr.d_besch_bis >= date_val(<<Datum>>) "/>\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + "\ |
|
||||||
and sva_pbv_aggr.ch110_besch_st in "+.vars["Beschäftigungsstelle (Person)"].allNeededKeysList + "\ |
|
||||||
/* and kapitel = <<Kapitel>> */\ |
|
||||||
/* and titel = <<Titel>> */\ |
|
||||||
/* and d_befristung <= date_val(<<Befristet bis>>)*/\ |
|
||||||
/* and teilzeitart in (<<Teilzeitart>>) */\ |
|
||||||
/* and ca501_staat <<Staatsangehörigkeit>> */\ |
|
||||||
/* and geschlecht= <<Geschlecht>> */\ |
|
||||||
/* and ${<<Filter Personal>>} */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
/* <#assign filter = filter + " and sva_pbv_aggr.kostenstelle in "+.vars["Kostenstelle (Person)"].allNeededKeysList /> -- <<Kostenstelle (Person)>> */\ |
|
||||||
/* <#assign filter = filter + " and sva_pbv_aggr.ca107_dienstart in "+.vars["Dienstart"].allNeededKeysList /> -- <<Dienstart>> */\ |
|
||||||
/* <#assign filter = filter + " and sva_pbv_aggr.ca108_amtsbez in "+.vars["Amtsbezeichnung"].allNeededKeysList /> -- <<Amtsbezeichnung>> */\ |
|
||||||
/* <#assign filter = filter + " and sva_pbv_aggr.ch212_geldgeber in "+.vars["Geldgeber"].allNeededKeysList /> -- <<Geldgeber>> */\ |
|
||||||
/* <#assign filter = filter + " and sva_pbv_aggr.vertart in "+.vars["Vertragsart"].allNeededKeysList /> -- <<Vertragsart>> */\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#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=filter />\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
@@@^^^Informationen über Stellen und deren Besetzung zu einem bel. Zeitpunkt^ ^^2^700^500^^1^<<SQL>> select 'Achtung: Das Datum des Buttons Institution bzw OrgEinheit (Stelle) unterscheidet sich vom ausgewählten Datum im Maskenfeld.' from xdummy where <<Institution (Stelle)-Stand>> != date_val(<<Datum>>)^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
100^48250^ |
|
||||||
@ -1,33 +0,0 @@ |
|||||||
48280^Studiengang^39^0^0^150^200^6^char^30^0^999^<<SQL>> select tid,name,sortnr from sichten where art in ('MAN-STG-Kostenstellen-Sicht','MAN-Studiengang-Sicht') and aktiv=1 order by 3,2;^ ^ ^ |
|
||||||
48281^Kennzahl^100^0^0^150^200^2^char^255^0^1^<<SQL>> select C.id,trim(C.name) || ' - (' || C.id || ')'\ |
|
||||||
from kenn_katalog C\ |
|
||||||
where \ |
|
||||||
C.id in (select distinct kenn_zahl from sxc_zahl_wert where sxc_bestand_id=<<Bestand>>)\ |
|
||||||
order by id^ ^ ^ |
|
||||||
48282^Institution^2^0^0^150^200^1^char^30^0^999^<<SQL>>select tid,type,name from sichten where art ='MAN-Kostenstellen-Sicht' and aktiv=1 order by type,name;^ ^ ^ |
|
||||||
48283^Start-Jahr^4^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='KENN-Jahr' order by 1;^ ^<<SQL>> SELECT ord,name FROM aggregierung where kategorie='KENN-Jahr' and ord=(year(today())-1) ;^ |
|
||||||
48284^Startsemester^7^0^0^140^80^1^integer^30^0^999^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^ ^ ^ |
|
||||||
48285^tablestylesheet^121^0^0^100^200^1^char^200^0^13^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430^hidden^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430 and S.ord=1^ |
|
||||||
48286^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_sxc_zahl_wert'\ |
|
||||||
and R.systeminfo_id=200)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ ^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_sxc_zahl_wert'\ |
|
||||||
and R.systeminfo_id=200) and uniquename='sxc_zahl_wert_stammdaten_nrw';^ |
|
||||||
48287^Spalten^3001^0^0^150^190^10^char^30^0^999^<<SQL>>\ |
|
||||||
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=<<Spaltenlayout>>) \ |
|
||||||
and L.is_visible=1\ |
|
||||||
order by 2;^ ^ ^ |
|
||||||
48288^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^hidden^<<SQL>> select 1,'Ja' from xdummy^ |
|
||||||
48289^Ausgabeformat^4001^0^0^100^150^1^char^200^0^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';^ |
|
||||||
48290^Endsemester^8^0^0^140^100^1^integer^30^0^999^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^ ^ ^ |
|
||||||
48291^End-Jahr^5^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='KENN-Jahr' order by 1;^ ^<<SQL>> SELECT ord,name FROM aggregierung where kategorie='KENN-Jahr' and ord=(year(today())-1) ;^ |
|
||||||
48292^Zeitraumtyp^110^0^0^100^150^1^char^30^1^1^<<SQL>> select 'S', 'Semester' from xdummy union select 'J', 'Jahr' from xdummy^hidden^<<SQL>> select 'S', 'Semester' from xdummy^ |
|
||||||
48293^Bestand^1^0^0^150^200^1^char^30^1^1^<<SQL>> select tid,name from sxc_bestand;^ ^<<SQL>> select tid,name from sxc_bestand order by tid;^ |
|
||||||
48294^Hochschule^1^0^0^150^200^5^char^30^0^12^<<SQL>> select tid, type, name,sortnr from sichten where art in('SXC_Hochschulen-Sicht') and aktiv=1 order by sortnr desc, name;^ ^ ^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48280^200^ |
|
||||||
@ -1,15 +0,0 @@ |
|||||||
48280^48280^ |
|
||||||
48280^48281^ |
|
||||||
48280^48282^ |
|
||||||
48280^48283^ |
|
||||||
48280^48284^ |
|
||||||
48280^48285^ |
|
||||||
48280^48286^ |
|
||||||
48280^48287^ |
|
||||||
48280^48288^ |
|
||||||
48280^48289^ |
|
||||||
48280^48290^ |
|
||||||
48280^48291^ |
|
||||||
48280^48292^ |
|
||||||
48280^48293^ |
|
||||||
48280^48294^ |
|
||||||
@ -1,141 +0,0 @@ |
|||||||
48280^SuperX-Connect Kennzahlen^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
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 caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Startsemester>> */\ |
|
||||||
/* and tid <= <<Endsemester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign jahr_param="" />\ |
|
||||||
<#assign jahr_filter="1=1" />\ |
|
||||||
/* <#assign jahr_param="<<Jahr>>" /> */\ |
|
||||||
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\ |
|
||||||
<#if jahr_param !="">\ |
|
||||||
<#assign jahr_filter="(" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + " or "/>\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter="1=1\ |
|
||||||
/* and hs_nr in (<<Hochschule>>) */\ |
|
||||||
/* and geschlecht=<<Geschlecht>> */\ |
|
||||||
/* and kenn_katalog.id in (<<Kennzahl>>) */ \ |
|
||||||
/* and jahr >= <<Start-Jahr>> */\ |
|
||||||
/* and jahr <= <<End-Jahr>> */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#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=filter/>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
@@@^ ^ ^Übersicht über vorberechnete Kennzahlen^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^1^600^360^^0^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
360^48280^ |
|
||||||
@ -1,30 +0,0 @@ |
|||||||
48310^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_erfolg_ba_ma_uebergang'))\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_erfolg_ba_ma_uebergang') and uniquename='ba_ma_uebergang_nach_abschluss';^ |
|
||||||
48311^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48312^Fächer^30^0^0^130^200^6^integer^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48313^Abschluss^40^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48314^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
|
||||||
48315^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^ ^ ^ |
|
||||||
48316^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^ ^ ^ |
|
||||||
48317^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48318^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48319^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48320^Semester^100^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^hidden^ ^ |
|
||||||
48321^Richtung^38^0^0^150^190^1^char^30^0^1^<<SQL>>select 'gw','Grundständig zu weiterf.' from xdummy union select 'wg','Weiterf. zu Grundständig' from xdummy order by 1;^ ^ ^ |
|
||||||
48322^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus where apnr like 'hrst%' order by 2^ ^ ^ |
|
||||||
48323^Jahr^110^0^0^140^80^1^integer^30^0^13^ ^ ^ ^ |
|
||||||
48324^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<<SQL>> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^^^ |
|
||||||
48325^Nur Endsemester^21^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^ |
|
||||||
48326^Matrikel-Nr.^35^350^-1^140^80^1^char^30^0^13^^^^ |
|
||||||
48328^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
|
||||||
48332^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
|
||||||
48333^Spalten^3001^0^0^150^190^10^char^30^0^1^<<SQL>>\ |
|
||||||
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=<<Spaltenlayout>>) order by 2;^^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48310^7^ |
|
||||||
@ -1,20 +0,0 @@ |
|||||||
48310^48310^ |
|
||||||
48310^48311^ |
|
||||||
48310^48312^ |
|
||||||
48310^48313^ |
|
||||||
48310^48314^ |
|
||||||
48310^48315^ |
|
||||||
48310^48316^ |
|
||||||
48310^48317^ |
|
||||||
48310^48318^ |
|
||||||
48310^48319^ |
|
||||||
48310^48320^ |
|
||||||
48310^48321^ |
|
||||||
48310^48322^ |
|
||||||
48310^48323^ |
|
||||||
48310^48324^ |
|
||||||
48310^48325^ |
|
||||||
48310^48326^ |
|
||||||
48310^48328^ |
|
||||||
48310^48332^ |
|
||||||
48310^48333^ |
|
||||||
@ -1,202 +0,0 @@ |
|||||||
48310^Übergang Bachelor-Master bzw. vorheriger Abschluss bei Master-Studienbeginn^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
SELECT distinct T.name,\ |
|
||||||
R.is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
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,\ |
|
||||||
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>\ |
|
||||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
||||||
select caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
R.is_virtual,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="SOS_MTKNR_EXT">\ |
|
||||||
select 1 from xdummy where 0 != (select \ |
|
||||||
count(*) from konstanten where beschreibung='SOS_MTKNR_EXT'\ |
|
||||||
and apnr=1)\ |
|
||||||
union select 0 from xdummy where 0 = (select \ |
|
||||||
count(*) from konstanten where beschreibung='SOS_MTKNR_EXT'\ |
|
||||||
and apnr=1)\ |
|
||||||
;\ |
|
||||||
</sqlvar>\ |
|
||||||
\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign richtung="" />\ |
|
||||||
/* <#assign richtung=<<Richtung>> />*/\ |
|
||||||
<#if richtung="" && rpta_column_layout.whereclause?index_of("gw") != -1>\ |
|
||||||
<#assign richtung="gw" />\ |
|
||||||
<#elseif richtung="" && rpta_column_layout.whereclause?index_of("wg") != -1>\ |
|
||||||
<#assign richtung="wg" />\ |
|
||||||
<#else>\ |
|
||||||
<#assign richtung="gw" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign mtknr_filter=basetable.name+".matrikel_nr::varchar(255)" />\ |
|
||||||
<#if SOS_MTKNR_EXT=1>\ |
|
||||||
<#assign mtknr_filter=basetable.name+".pseudonym" />\ |
|
||||||
</#if>\ |
|
||||||
<#if richtung="gw" >\ |
|
||||||
<#assign tid_stg_col="abschluss_vorher_tid_stg" />\ |
|
||||||
<#assign stg_col="abschluss_vorher_stg" />\ |
|
||||||
<#assign abschluss_col="abschluss_vorher_abschluss" />\ |
|
||||||
<#assign semester_col="abschluss_vorher_semester" />\ |
|
||||||
</#if>\ |
|
||||||
<#if richtung="wg" >\ |
|
||||||
<#assign tid_stg_col="einschr_nachher_tid_stg" />\ |
|
||||||
<#assign stg_col="einschr_nachher_stg" />\ |
|
||||||
<#assign abschluss_col="einschr_nachher_abschluss" />\ |
|
||||||
<#assign semester_col="einschr_nachher_semester" />\ |
|
||||||
</#if>\ |
|
||||||
<#assign filter="1=1" />\ |
|
||||||
/* <#assign filter=filter+" and richtung='"+richtung+"'" /> --<<Richtung>> */\ |
|
||||||
\ |
|
||||||
<#assign studiengang_filter = "" />\ |
|
||||||
/* <#assign studiengang_filter = Studiengang.allNeededKeysList /> --<<Studiengang>> */ \ |
|
||||||
<#if studiengang_filter != "" >\ |
|
||||||
<#assign filter=filter + " and ('s_' || erfolg_ba_ma_uebergang."+tid_stg_col+"_1 in "+ studiengang_filter/> \ |
|
||||||
<#list 2..5 as fachnr>\ |
|
||||||
<#assign filter=filter + " or 's_' || erfolg_ba_ma_uebergang."+tid_stg_col+"_"+fachnr+" in "+ studiengang_filter /> \ |
|
||||||
</#list>\ |
|
||||||
<#assign filter=filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign fach_filter = "" />\ |
|
||||||
/* <#assign fach_filter = Fächer.allNeededKeysList /> --<<Fächer>> */ \ |
|
||||||
<#if fach_filter != "" >\ |
|
||||||
<#assign filter=filter + " and (erfolg_ba_ma_uebergang."+stg_col+"_1 in "+ fach_filter/> \ |
|
||||||
<#list 2..5 as fachnr>\ |
|
||||||
<#assign filter=filter + " or erfolg_ba_ma_uebergang."+stg_col+"_"+fachnr+" in "+ fach_filter /> \ |
|
||||||
</#list>\ |
|
||||||
<#assign filter=filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
/* \ |
|
||||||
<#assign filter = filter + " and " +abschluss_col+" in "+Studienabschluss.allNeededKeysList /> --<<Studienabschluss>> */\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
/* <#assign filter=filter+" and "+ semester_col+" >=" + "<<Seit Semester>>" /> */\ |
|
||||||
/* <#assign filter=filter+" and "+ semester_col+" <=" + "<<Bis Semester>>" /> */\ |
|
||||||
\ |
|
||||||
<#assign filter=filter+" \ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and einschr_nachher_<<Hörerstatus>>*/\ |
|
||||||
/* and <<Matrikel-Nr.>>=${mtknr_filter} */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
/* \ |
|
||||||
<#assign filter = filter + " and '' || "+basetable.name+".ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
\ |
|
||||||
<#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=filter />\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
<#if 1=0>\ |
|
||||||
Column CID=0 heading_text="sortnr" center_heading explanation=""\ |
|
||||||
row_selectable heading_platform readonly\ |
|
||||||
width=5 text_size=60\ |
|
||||||
</#if>\ |
|
||||||
@@@^Studienfach^Anzahl bzw. Anteil^Übergang nach Abschluss zu einem neuen Studiengang oder vorheriger Abschluss bei Studienbeginn^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
16^48310^ |
|
||||||
@ -1,3 +0,0 @@ |
|||||||
48380^Basistabelle^0^0^0^150^450^1^integer^30^0^1^<<SQL>> select tid, uniquename || ' - ' || caption from rpta_resultset order by caption;^ ^ ^ |
|
||||||
48381^zu löschendes Spaltenlayout^0^0^0^200^380^1^integer^30^1^1^<<SQL>> select tid, uniquename || ' - ' || caption from rpta_column_layout where 1=1 /* and <<Basistabelle>>=resultset_id*/ order by caption;^^^ |
|
||||||
48382^gew. Layout löschen?^1^0^0^200^100^1^char^30^1^1^<<SQL>> select 'J', 'ja, Layout löschen' from xdummy union select 'N', 'nein, nicht löschen' from xdummy order by 2;^^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48380^9^ |
|
||||||
@ -1,3 +0,0 @@ |
|||||||
48380^48380^ |
|
||||||
48380^48381^ |
|
||||||
48380^48382^ |
|
||||||
@ -1,46 +0,0 @@ |
|||||||
48380^Spaltenlayout löschen^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--Layout löschen\ |
|
||||||
-- Ist nur für User erlaubt, die Administratoren sind\ |
|
||||||
--Autor: M. Winterstein nach Maske löschen von D. Quathamer\ |
|
||||||
--Datum: 18.08.2025\ |
|
||||||
\ |
|
||||||
--create temp table tmp_loesch (layout_tid integer, layout_uniquename varchar(255), best_tid integer);\ |
|
||||||
--insert into tmp_loesch(layout_tid, layout_uniquename) \ |
|
||||||
--values (<<zu löschendes Spaltenlayout>>, <<Spaltenlayout (bestätigen)>>);\ |
|
||||||
--update tmp_loesch set best_tid=0 where best_tid is null;\ |
|
||||||
\ |
|
||||||
<#if <<gew. Layout löschen?>> ='J'>\ |
|
||||||
delete from rpta_column2layout where layout_id in (<<zu löschendes Spaltenlayout>>)\ |
|
||||||
and 1=(select administration from userinfo where tid=<<UserID>>);\ |
|
||||||
delete from rpta_column_layout where tid=<<zu löschendes Spaltenlayout>> \ |
|
||||||
and 1=(select administration from userinfo where tid=<<UserID>>);\ |
|
||||||
select sp_update_sequence('rpta_column_layout');\ |
|
||||||
select sp_update_sequence('rpta_column2layout');\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
--drop table tmp_ergebnis;\ |
|
||||||
create temp table tmp_ergebnis \ |
|
||||||
(sp1 varchar(50),\ |
|
||||||
sp2 varchar(200)\ |
|
||||||
); \ |
|
||||||
insert into tmp_ergebnis \ |
|
||||||
select 'Ergebnis', 'Spaltenlayout erfolgreich gelöscht' from xdummy where 0= (select count(*) from rpta_column_layout where tid=<<zu löschendes Spaltenlayout>> );\ |
|
||||||
insert into tmp_ergebnis \ |
|
||||||
select 'Ergebnis', 'Kein Löschen ausgewählt! Spaltenlayout wurde nicht gelöscht' from xdummy where <<gew. Layout löschen?>> != 'J';\ |
|
||||||
insert into tmp_ergebnis \ |
|
||||||
select 'Ergebnis', 'Benutzerrechte reichen nicht aus. Spaltenlayout wurde nicht gelöscht' from xdummy where (select administration from userinfo where tid=<<UserID>>)!= 1;\ |
|
||||||
\ |
|
||||||
--drop table tmp_loesch;\ |
|
||||||
select sp1,sp2 from tmp_ergebnis;^XIL List\ |
|
||||||
drop_and_delete movable_columns sizable_columns horizontal_scrolling\ |
|
||||||
white_space_color=COLOR_WHITE fixed_columns=2\ |
|
||||||
min_heading_height=35\ |
|
||||||
Column CID=0 heading_text="Ergebnis " center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=1 heading_text=" Wert " center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=150 text_size=200\ |
|
||||||
@@@^ ^ ^Eine vorhandene Maske löschen^drop table tmp_ergebnis;^^2^440^360^0^1^ ^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
8^48380^ |
|
||||||
@ -1,11 +0,0 @@ |
|||||||
48410^Basistabelle^0^0^0^150^450^1^integer^30^0^1^<<SQL>> select tid, uniquename || ' - ' || caption from rpta_resultset order by caption;^ ^ ^ |
|
||||||
48411^Neuer Name^2^0^0^150^250^1^char^100^1^0^^ ^ ^ |
|
||||||
48412^Neuer Schlüssel^1^0^0^150^200^1^char^30^1^0^^ ^ ^ |
|
||||||
48413^Erläuterung^12^0^0^150^400^1^char^240^0^0^^ ^ ^ |
|
||||||
48414^Art der Kopie^1065^0^0^100^150^1^char^30^1^1^<<SQL>> select 'makro','Makrobericht' from xdummy \ |
|
||||||
union select 'sximport','SX-Importkopie' from xdummy\ |
|
||||||
union select 'standard','Standardkopie' from xdummy\ |
|
||||||
;^hidden^<<SQL>> select 'standard','Standardkopie' from xdummy;^ |
|
||||||
48415^Achtung:^100^0^0^400^450^1^char^100^0^8^<<SQL>> select 'Vorhandene Spaltenlayouts mit gleichem Schlüssel werden überschrieben!' from xdummy;^ ^<<SQL>> select 'Vorhandene Spaltenlayouts mit gleichem Schlüssel werden überschrieben!' from xdummy;^ |
|
||||||
48416^zu kopierendes Spaltenlayout^1^0^0^150^450^1^integer^30^1^1^<<SQL>> select tid, uniquename || ' - ' || caption from rpta_column_layout where 1=1 /* and <<Basistabelle>>=resultset_id*/ order by caption;^ ^ ^ |
|
||||||
48417^vorh. Layout überschreiben?^80^0^0^100^150^1^char^30^1^1^<<SQL>> select 'J', 'ja, vorh. Layout überschreiben' from xdummy union select 'N', 'nein, nicht überschreiben' from xdummy order by 2;^ ^<<SQL>> select 'N', 'nein, nicht überschreiben' from xdummy order by 2;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48410^9^ |
|
||||||
@ -1,8 +0,0 @@ |
|||||||
48410^48410^ |
|
||||||
48410^48411^ |
|
||||||
48410^48412^ |
|
||||||
48410^48413^ |
|
||||||
48410^48414^ |
|
||||||
48410^48415^ |
|
||||||
48410^48416^ |
|
||||||
48410^48417^ |
|
||||||
@ -1,133 +0,0 @@ |
|||||||
48410^Spaltenlayout kopieren^--freemarker template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="start_serial">\ |
|
||||||
select max(tid)+1 from rpta_column2layout;\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="layout_exists">\ |
|
||||||
select count(*) from rpta_column_layout where uniquename=<<Neuer Schlüssel>>;\ |
|
||||||
</sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
--Autor: D. Quathamer\ |
|
||||||
--Datum: 2.4.2002\ |
|
||||||
\ |
|
||||||
<#assign zeichen1="<"> \ |
|
||||||
<#assign zeichen2=">"> \ |
|
||||||
<#assign zeichen3="/"> \ |
|
||||||
<#if SQLdialect='Postgres'>\ |
|
||||||
begin work;\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
create temp table tmp_rpta_column_layout \ |
|
||||||
(\ |
|
||||||
tid integer NOT NULL, --vorher serial\ |
|
||||||
uniquename varchar(255) NOT NULL,\ |
|
||||||
caption varchar(255),\ |
|
||||||
resultset_id integer,\ |
|
||||||
whereclause text,\ |
|
||||||
description text,\ |
|
||||||
userinfo_id integer,\ |
|
||||||
sortnr integer,\ |
|
||||||
sortclause text,\ |
|
||||||
is_virtual smallint DEFAULT 1 NOT NULL\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
create temp table tmp_rpta_column2layout \ |
|
||||||
(\ |
|
||||||
tid serial NOT NULL, \ |
|
||||||
column_id integer,\ |
|
||||||
layout_id integer,\ |
|
||||||
sortnr smallint,\ |
|
||||||
is_visible smallint DEFAULT 1,\ |
|
||||||
visible_size smallint,\ |
|
||||||
format_code_id integer,\ |
|
||||||
targetfieldname varchar(255),\ |
|
||||||
caption varchar(255),\ |
|
||||||
description text\ |
|
||||||
);\ |
|
||||||
ALTER SEQUENCE tmp_rpta_column2layout_tid_seq RESTART with ${start_serial};\ |
|
||||||
insert into tmp_rpta_column_layout select * from rpta_column_layout where tid=<<zu kopierendes Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
insert into tmp_rpta_column2layout \ |
|
||||||
(\ |
|
||||||
column_id,\ |
|
||||||
layout_id,\ |
|
||||||
sortnr,\ |
|
||||||
is_visible,\ |
|
||||||
visible_size,\ |
|
||||||
format_code_id,\ |
|
||||||
targetfieldname,\ |
|
||||||
caption,\ |
|
||||||
description\ |
|
||||||
)\ |
|
||||||
select \ |
|
||||||
column_id,\ |
|
||||||
layout_id,\ |
|
||||||
sortnr,\ |
|
||||||
is_visible,\ |
|
||||||
visible_size,\ |
|
||||||
format_code_id,\ |
|
||||||
targetfieldname,\ |
|
||||||
caption,\ |
|
||||||
description\ |
|
||||||
from rpta_column2layout where layout_id=<<zu kopierendes Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column_layout set uniquename=<<Neuer Schlüssel>>;\ |
|
||||||
update tmp_rpta_column_layout set caption=<<Neuer Name>>; \ |
|
||||||
update tmp_rpta_column_layout set userinfo_id=<<UserID>>;\ |
|
||||||
/*update tmp_rpta_column_layout set description=<<Erläuterung>>;*/\ |
|
||||||
\ |
|
||||||
<#if <<vorh. Layout überschreiben?>> ='J' || layout_exists=0 >\ |
|
||||||
--Falls das neue Layout bereits existiert, wird es gelöscht:\ |
|
||||||
delete from rpta_column2layout where layout_id = (select tid from rpta_column_layout where uniquename=<<Neuer Schlüssel>>)\ |
|
||||||
and (select administration from userinfo where tid=<<UserID>>)= 1;\ |
|
||||||
delete from rpta_column_layout where uniquename=<<Neuer Schlüssel>>\ |
|
||||||
and (select administration from userinfo where tid=<<UserID>>)= 1;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column_layout set tid = (select (max(tid)+1) from rpta_column_layout);\ |
|
||||||
update tmp_rpta_column2layout set layout_id = (select tid from tmp_rpta_column_layout);\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
insert into rpta_column_layout select * from tmp_rpta_column_layout \ |
|
||||||
where (select administration from userinfo where tid=<<UserID>>)= 1;\ |
|
||||||
insert into rpta_column2layout select * from tmp_rpta_column2layout \ |
|
||||||
where (select administration from userinfo where tid=<<UserID>>)= 1;\ |
|
||||||
select sp_update_sequence('rpta_column_layout');\ |
|
||||||
select sp_update_sequence('rpta_column2layout');\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#if SQLdialect='Postgres'>\ |
|
||||||
commit;\ |
|
||||||
</#if>\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
create temp table tmp_ergebnis \ |
|
||||||
(sp1 varchar(150),\ |
|
||||||
sp2 varchar(150), sp3 varchar(150)); \ |
|
||||||
\ |
|
||||||
insert into tmp_ergebnis (sp1,sp2)\ |
|
||||||
select 'Ergebnis', 'Benutzerrechte reichen nicht aus. Spaltenlayout wurde nicht kopiert' from xdummy where (select administration from userinfo where tid=<<UserID>>)!= 1;\ |
|
||||||
<#if <<vorh. Layout überschreiben?>> ='J' || layout_exists=0 >\ |
|
||||||
insert into tmp_ergebnis (sp1,sp2,sp3)\ |
|
||||||
select 'Neues Spaltenlayout:',uniquename || '- ' || caption,'../edit/rpta/rpta_column_layout_edit.jsp|tid=' || tid from rpta_column_layout where tid = (select tid from tmp_rpta_column_layout);\ |
|
||||||
<#else>\ |
|
||||||
insert into tmp_ergebnis (sp1,sp2)\ |
|
||||||
select 'Ergebnis', 'kein Überschreiben gewünscht!' from xdummy ;\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select sp1,sp2,sp3 as nextedit from tmp_ergebnis ;^XIL List\ |
|
||||||
drop_and_delete movable_columns sizable_columns horizontal_scrolling\ |
|
||||||
white_space_color=COLOR_WHITE fixed_columns=2\ |
|
||||||
min_heading_height=35\ |
|
||||||
Column CID=0 heading_text="Ergebnis " center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=1 heading_text=" Wert " center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=2 heading_text=" Bearbeiten" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
@@@^ ^ ^Eine neue Maske kopieren^drop table tmp_ergebnis;drop table tmp_rpta_column_layout;drop table tmp_rpta_column2layout;^^2^440^360^^1^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
8^48410^ |
|
||||||
@ -1,41 +0,0 @@ |
|||||||
48430^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_zul_antr_aggr','rpta_zul_antr_aggr_archiv')\ |
|
||||||
and R.systeminfo_id=130)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ ^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_zul_antr_aggr_archiv'\ |
|
||||||
and R.systeminfo_id=130);^ |
|
||||||
48431^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select case when tid % 10 = 1 then tid+1 else tid+9 end,\ |
|
||||||
(select eintrag from semester where tid in \ |
|
||||||
(select case when tid % 10 = 1 then tid+1 else tid+9 end from semester where today() between sem_beginn and sem_ende)) \ |
|
||||||
from semester \ |
|
||||||
where today() between sem_beginn and sem_ende;^ |
|
||||||
48432^Fächer^30^0^0^130^200^6^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48433^Abschluss^40^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48434^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^999^^ ^ ^ |
|
||||||
48435^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^ ^ ^ |
|
||||||
48436^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^999^hs_zugangsber^ ^ ^ |
|
||||||
48437^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select case when tid % 10 = 1 then tid+1 else tid+9 end,\ |
|
||||||
(select eintrag from semester where tid in \ |
|
||||||
(select case when tid % 10 = 1 then tid+1 else tid+9 end from semester where today() between sem_beginn and sem_ende)) \ |
|
||||||
from semester \ |
|
||||||
where today() between sem_beginn and sem_ende;^ |
|
||||||
48438^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48439^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48440^Semester^100^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^hidden^ ^ |
|
||||||
48441^Stichtag^23^330^-1^130^100^1^sql^30^1^999^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^ |
|
||||||
48442^Hörerstatus^200^330^-1^140^150^1^sql^30^0^999^<<SQL>> select apnr, eintrag from hoererstatus order by 2^ ^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^ |
|
||||||
48443^Jahr^110^0^0^140^80^1^integer^30^0^13^^ ^ ^ |
|
||||||
48444^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<<SQL>> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^ ^ ^ |
|
||||||
48445^Nur Endsemester^21^0^0^140^80^1^integer^30^0^999^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^ |
|
||||||
48446^Matrikel-Nr.^35^350^-1^140^80^1^char^30^0^13^^ ^ ^ |
|
||||||
48448^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^999^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
|
||||||
48452^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
|
||||||
48453^Spalten^3001^0^0^150^190^10^char^30^0^999^<<SQL>>\ |
|
||||||
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=<<Spaltenlayout>>) order by 2;^ ^ ^ |
|
||||||
48454^Bewerbungen^1^0^0^150^200^1^sql^30^0^1^<<SQL>> select '=1 and antrnr=1','Antragsfächer (je 1. Fach des 1. Antrages)' from xdummy union select '=1','Anträge (je 1. Fach)' from xdummy union select '= fachnr and antrnr=1','Antragsfächer (des 1. Antrages)' from xdummy union select '=fachnr','Antragsfächer (alle)' from xdummy order by 2;^^<<SQL>> select '=1 and antrnr=1','Antragsfächer (je 1. Fach des 1. Antrages)' from xdummy;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48430^7^ |
|
||||||
@ -1,21 +0,0 @@ |
|||||||
48430^48430^ |
|
||||||
48430^48431^ |
|
||||||
48430^48432^ |
|
||||||
48430^48433^ |
|
||||||
48430^48434^ |
|
||||||
48430^48435^ |
|
||||||
48430^48436^ |
|
||||||
48430^48437^ |
|
||||||
48430^48438^ |
|
||||||
48430^48439^ |
|
||||||
48430^48440^ |
|
||||||
48430^48441^ |
|
||||||
48430^48442^ |
|
||||||
48430^48443^ |
|
||||||
48430^48444^ |
|
||||||
48430^48445^ |
|
||||||
48430^48446^ |
|
||||||
48430^48448^ |
|
||||||
48430^48452^ |
|
||||||
48430^48453^ |
|
||||||
48430^48454^ |
|
||||||
@ -1,157 +0,0 @@ |
|||||||
48430^Bewerbungen und Zulassungen^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
SELECT distinct T.name,\ |
|
||||||
R.is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
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,\ |
|
||||||
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>\ |
|
||||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
||||||
select caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
R.is_virtual,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign semester_filter ="1=1\ |
|
||||||
/* and bewsem >= <<Seit Semester>> */\ |
|
||||||
/* and bewsem <= <<Bis Semester>> */\ |
|
||||||
" />\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
<#assign semester_filter = semester_filter+ " and substring('' || bewsem from 5 for 1)='<<Semestertyp>>'" />\ |
|
||||||
</#if>\ |
|
||||||
<#if "<<Nur Endsemester>>"="1">\ |
|
||||||
--nur Endsemester\ |
|
||||||
<#assign semester_filter = semester_filter+ " and 1=1 and bewsem = "+endsemester /> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter="1=1\ |
|
||||||
/* and bewsem = <<Semester>> */\ |
|
||||||
--/* and stichtag = <<Stichtag>> */\ |
|
||||||
--/* and <<Hochschulzugangsberechtigung>> */\ |
|
||||||
--/* and <<Hörerstatus>>*/\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and substring('' || bewsem from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and ${<<Filter Studierende>>} */\ |
|
||||||
/* and fachnr <<Bewerbungen>> */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + semester_filter />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and ('s_' || tid_stg in "+Studiengang.allNeededKeysList +" or tid_stg is null)"/> \ |
|
||||||
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<<Fächer>> */\ |
|
||||||
/* <#assign filter = filter + " and tid_stg in (select L2.tid from lehr_stg_ab L2 where L2.abschluss in "+Abschluss.allNeededKeysList +")" /> --<<Abschluss>> */\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#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>\ |
|
||||||
<#if 1=0>\ |
|
||||||
Column CID=0 heading_text="sortnr" center_heading explanation=""\ |
|
||||||
row_selectable heading_platform readonly\ |
|
||||||
width=5 text_size=60\ |
|
||||||
</#if>\ |
|
||||||
@@@^Studienfach^Anzahl bzw. Anteil^Bewerbungen und Zulassungen^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
130^48430^ |
|
||||||
@ -1,25 +0,0 @@ |
|||||||
48460^Grafik^1000^300^-1^170^150^1^char^30^0^1^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=48460 order by 2;^ ^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=48460 order by 2 limit 1;^ |
|
||||||
48461^Org. Einheit^1^0^0^150^200^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='FIN-Kostenstellen-Sicht' and aktiv=1 order by sortnr;^^^ |
|
||||||
48462^Haushaltsjahr (HHJ)^2^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='FIN-Jahr' order by 1;^^ ^ |
|
||||||
48463^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \ |
|
||||||
select tid, eintrag from semester \ |
|
||||||
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\ |
|
||||||
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\ |
|
||||||
</#if>\ |
|
||||||
and sem_beginn <=today()\ |
|
||||||
order by tid DESC;^hidden^ ^ |
|
||||||
48464^tablestylesheet^150^0^0^100^100^1^char^255^1^1^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=48460 order by ord^ ^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=48460 order by ord limit 1^ |
|
||||||
48466^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='fin_konto_aggr_gege'\ |
|
||||||
and R.systeminfo_id=3)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^^<<SQL>> SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='fin_konto_aggr_gege'\ |
|
||||||
and R.systeminfo_id=3)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ |
|
||||||
48468^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^hidden^<<SQL>> select 1,'Ja' from xdummy^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48460^200^ |
|
||||||
@ -1,7 +0,0 @@ |
|||||||
48460^48460^ |
|
||||||
48460^48461^ |
|
||||||
48460^48462^ |
|
||||||
48460^48463^ |
|
||||||
48460^48464^ |
|
||||||
48460^48466^ |
|
||||||
48460^48468^ |
|
||||||
@ -1,119 +0,0 @@ |
|||||||
48460^Kontostände Finanzbuchhaltung^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
SELECT distinct T.name,\ |
|
||||||
R.is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
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,\ |
|
||||||
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>\ |
|
||||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
||||||
select caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
R.is_virtual,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T,rpta_column2layout CL \ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="jahr_filter" ><![CDATA[\ |
|
||||||
select max(rechnungsjahr) from fin_konto_aggr\ |
|
||||||
where 1=1\ |
|
||||||
/* and rechnungsjahr <=<<Haushaltsjahr (HHJ)>> */\ |
|
||||||
/* and rechnungsjahr<=get_akad_jahr(<<Bis Semester>>,'A') */\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter="fin_konto_aggr.rechnungsjahr BETWEEN ("+jahr_filter+"-4) AND "+jahr_filter />\ |
|
||||||
\ |
|
||||||
<#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=filter/>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
@@@^^^Einnahmen / Ausgaben nach Geldgeber^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^1^600^360^0^^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
50^48460^ |
|
||||||
@ -1,40 +0,0 @@ |
|||||||
48490^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag='Fälle';^ |
|
||||||
48491^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \ |
|
||||||
select tid, eintrag from semester \ |
|
||||||
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\ |
|
||||||
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\ |
|
||||||
</#if>\ |
|
||||||
and sem_beginn <=today()\ |
|
||||||
order by tid DESC;^Eintrag^<<SQL>> select tid,eintrag from semester where today()-(4*365) between sem_beginn and sem_ende;^ |
|
||||||
48492^Stichtag^1^350^-1^140^100^1^sql^30^0^13^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen' and appl_key='2';^ |
|
||||||
48493^Staatsangehörigkeit^36^0^0^130^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^hidden^ ^ |
|
||||||
48494^Prüfungsstatus^13^0^0^140^70^1^char^30^0^1^<<SQL>> select apnr,druck from sos_k_pstatus;^ ^<<SQL>> select apnr,druck from sos_k_pstatus where apnr='BE';^ |
|
||||||
48495^Fächer^9^0^0^130^150^6^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48497^bis Fachsemester^35^350^-1^140^100^1^integer^30^0^13^^ ^ ^ |
|
||||||
48499^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \ |
|
||||||
select tid, eintrag from semester \ |
|
||||||
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\ |
|
||||||
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\ |
|
||||||
</#if>\ |
|
||||||
and sem_beginn <=today()\ |
|
||||||
order by tid DESC;^Eintrag^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48501^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
|
||||||
48503^Studiengang^6^0^0^140^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48504^Jahr^110^0^0^140^80^1^integer^30^0^13^^ ^ ^ |
|
||||||
48505^tablestylesheet^150^0^0^100^100^1^char^255^1^1^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=48490 order by ord,2^ ^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=48490 order by ord,2 limit 1^ |
|
||||||
48508^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_sos_lab_aggr','rpta_sos_lab_stg')\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^ ^<<SQL>>SELECT uniquename,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_sos_lab_aggr'\ |
|
||||||
and R.systeminfo_id=7) and uniquename='rpta_sos_lab_aggr_sem';^ |
|
||||||
48509^Semestertyp^5^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^Eintrag^ ^ |
|
||||||
48510^##line##^30^0^0^100^100^1^char^5000^0^8^^ ^1^ |
|
||||||
48511^Abschluss^7^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48512^Matrikel-Nr.^20^350^-1^150^180^1^char^200^0^13^^{InputCheck:matrikelnummern}^ ^ |
|
||||||
48513^##line##^40^0^0^100^100^1^char^5000^0^8^^ ^1^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
48490^7^ |
|
||||||
@ -1,18 +0,0 @@ |
|||||||
48490^48490^ |
|
||||||
48490^48491^ |
|
||||||
48490^48492^ |
|
||||||
48490^48493^ |
|
||||||
48490^48494^ |
|
||||||
48490^48495^ |
|
||||||
48490^48497^ |
|
||||||
48490^48499^ |
|
||||||
48490^48501^ |
|
||||||
48490^48503^ |
|
||||||
48490^48504^ |
|
||||||
48490^48505^ |
|
||||||
48490^48508^ |
|
||||||
48490^48509^ |
|
||||||
48490^48510^ |
|
||||||
48490^48511^ |
|
||||||
48490^48512^ |
|
||||||
48490^48513^ |
|
||||||
@ -1,173 +0,0 @@ |
|||||||
48490^Absolvierende nach Studiengang^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="my_base_rs"><![CDATA[\ |
|
||||||
select R.uniquename\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
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 caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.name}';\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
|
||||||
select L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
R.is_virtual,\ |
|
||||||
L.sortclause\ |
|
||||||
from rpta_resultset R, rpta_column_layout L\ |
|
||||||
where L.resultset_id=R.tid\ |
|
||||||
and R.uniquename='${basetable.name}'\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
|
||||||
SELECT C.srcfieldname,\ |
|
||||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
|
||||||
T.uniquename as coltype,\ |
|
||||||
C.is_aggregate,\ |
|
||||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
|
||||||
CL.is_visible,\ |
|
||||||
CL.visible_size as visible_width,\ |
|
||||||
F.sql_code as format_sql,\ |
|
||||||
F.uniquename as format_uniquename,\ |
|
||||||
C.col_function as colfunction,\ |
|
||||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
|
||||||
FROM rpta_column_layout L, rpta_column C, rpta_column_type T, rpta_column2layout CL\ |
|
||||||
left outer join rpta_format_code F on (F.tid=CL.format_code_id)\ |
|
||||||
where L.tid=CL.layout_id\ |
|
||||||
and C.tid=CL.column_id\ |
|
||||||
and T.tid=C.column_type\ |
|
||||||
and L.uniquename=<<Spaltenlayout>>\ |
|
||||||
/* and C.uniquename in (<<Spalten>>) */\ |
|
||||||
order by CL.sortnr\ |
|
||||||
;\ |
|
||||||
]]></sqlvar>\ |
|
||||||
<sqlvar name="endsemester"><![CDATA[\ |
|
||||||
SELECT max(tid)\ |
|
||||||
from semester \ |
|
||||||
where 1=1\ |
|
||||||
/* and tid >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
]]></sqlvar>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign jahr_param="" />\ |
|
||||||
<#assign jahr_filter="1=1" />\ |
|
||||||
/* <#assign jahr_param="<<Jahr>>" /> */\ |
|
||||||
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\ |
|
||||||
<#if jahr_param !="">\ |
|
||||||
<#assign jahr_filter="(" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem_der_pruefung from 5 for 1)='2' and val(substring('' || sem_der_pruefung from 1 for 4))="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + " or "/>\ |
|
||||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem_der_pruefung from 5 for 1)='1' and (val(substring('' || sem_der_pruefung from 1 for 4))-1)="+jahr_param+")" />\ |
|
||||||
<#assign jahr_filter=jahr_filter + ")" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign semester_filter ="1=1\ |
|
||||||
/* and sem_der_pruefung >= <<Seit Semester>> */\ |
|
||||||
/* and sem_der_pruefung <= <<Bis Semester>> */\ |
|
||||||
" />\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
<#assign semester_filter = semester_filter+ " and substring('' || sem_der_pruefung from 5 for 1)='<<Semestertyp>>'" />\ |
|
||||||
</#if>\ |
|
||||||
<#if "<<Nur Endsemester>>"="1">\ |
|
||||||
--nur Endsemester\ |
|
||||||
<#assign semester_filter = semester_filter+ " and 1=1 and sem_der_pruefung = "+endsemester /> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if my_base_rs = "rpta_sos_lab_aggr">\ |
|
||||||
<#assign filter="<<Köpfe oder Fälle ?>>\ |
|
||||||
/* and sem_der_pruefung = <<Semester>> */\ |
|
||||||
/* and stichtag = <<Stichtag>> */\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
/* and substring('' || sem_der_pruefung from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and pstatus=<<Prüfungsstatus>> */\ |
|
||||||
" />\ |
|
||||||
<#elseif my_base_rs = "rpta_sos_lab_stg">\ |
|
||||||
<#assign filter="<<Köpfe oder Fälle ?>>\ |
|
||||||
/* and sem_d_abg_pruefung = <<Semester>> */\ |
|
||||||
/* and stichtag = <<Stichtag>> */\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
/* and substring('' || sem_der_pruefung from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and pstatus=<<Prüfungsstatus>> */\ |
|
||||||
" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + jahr_filter />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + semester_filter />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
||||||
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
/* <#assign filter = filter + " and tid_stg in (select L2.tid from lehr_stg_ab L2 where L2.stg in "+Fächer.allNeededKeysList +")" /> --<<Fächer>> */\ |
|
||||||
/* <#assign filter = filter + " and tid_stg in (select L2.tid from lehr_stg_ab L2 where L2.abschluss in "+Abschluss.allNeededKeysList +")" /> --<<Abschluss>> */\ |
|
||||||
\ |
|
||||||
<#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>\ |
|
||||||
@@@^Altersgruppe^Anzahl^Studienanfänger_innen als Zeitreihe, nach Gesschlecht und Fakultät in verschiedenen Visualisierungen^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^3^700^360^^1^^ |
|
||||||
@ -1 +0,0 @@ |
|||||||
16^48490^ |
|
||||||
@ -1,384 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_lab_aggr_exists"> |
|
||||||
select sp_table_exists('sos_lab_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sos_lab_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang.tid=sos_lab_aggr.tid_stg' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sos_lab_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_sos_lab_aggr", "caption":"Absolvierende"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sos_lab_aggr' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sos_lab_aggr' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>', |
|
||||||
whereclause='and stichtag=(select ST.tid from sos_stichtag ST where ST.appl_key=''2'') and abschnitt=2 and pstatus=''BE'''; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sos_lab_aggr_exists=1 |
|
||||||
@ -1,400 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="zul_antr_aggr_archiv_exists"> |
|
||||||
select sp_table_exists('zul_antr_aggr_archiv') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='zul_antr_aggr_archiv' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if zul_antr_aggr_archiv_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_zul_antr_aggr_archiv", "caption":"Bewerbungen und Zulassungen historisiert"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Institution' |
|
||||||
-- WHERE name='man_organigramm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienart' |
|
||||||
-- WHERE name = 'sos_k_stuart'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studiumstyp' |
|
||||||
-- WHERE name = 'sos_k_stutyp'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienform' |
|
||||||
-- WHERE name = 'sos_k_stufrm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Hörerstatus' |
|
||||||
-- WHERE name = 'sos_k_hrst'; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--drop view if exists sos_stud_astat; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='zul_antr_aggr_archiv' |
|
||||||
and name not in ('value','value1','value2'); |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='zul_antr_aggr_archiv' |
|
||||||
and name in ('value','value1','value2'); |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
130 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn zul_antr_aggr_archiv_exists=1 |
|
||||||
@ -1,431 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="zul_antr_aggr_exists"> |
|
||||||
select sp_table_exists('zul_antr_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='zul_antr_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'zul_antr_aggr.stg=zul_k_stg.apnr' as joinclause |
|
||||||
from sx_tables where name in ('zul_k_stg') |
|
||||||
union |
|
||||||
select 20::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'zul_antr_aggr.abschl=zul_k_abint.apnr' as joinclause |
|
||||||
from sx_tables where name in ('zul_k_abint') |
|
||||||
union |
|
||||||
select 30::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'zul_antr_aggr.stort=zul_k_stort.apnr' as joinclause |
|
||||||
from sx_tables where name in ('zul_k_stort') |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if zul_antr_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_zul_antr_aggr", "caption":"Bewerbungen und Zulassungen"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Abschlüsse' |
|
||||||
WHERE name='zul_k_abint'; |
|
||||||
update sx_fields set caption='Schlüssel Abschluss' |
|
||||||
where table_name='zul_k_abint' |
|
||||||
and name='apnr'; |
|
||||||
update sx_fields set caption='Bezeichnung Abschluss' |
|
||||||
where table_name='zul_k_abint' |
|
||||||
and name='druck'; |
|
||||||
update sx_fields set caption='Amtlicher Schlüssel Abschluss' |
|
||||||
where table_name='zul_k_abint' |
|
||||||
and name='astat'; |
|
||||||
update sx_fields set currentlyused=0 |
|
||||||
where table_name='zul_k_abint' |
|
||||||
and name='tid'; |
|
||||||
|
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Standorte' |
|
||||||
WHERE name='zul_k_stort'; |
|
||||||
update sx_fields set caption='Schlüssel Standort' |
|
||||||
where table_name='zul_k_stort' |
|
||||||
and name='apnr'; |
|
||||||
update sx_fields set caption='Bezeichnung Standort' |
|
||||||
where table_name='zul_k_stort' |
|
||||||
and name='druck'; |
|
||||||
update sx_fields set caption='Kurztext Abschluss' |
|
||||||
where table_name='zul_k_stort' |
|
||||||
and name='kurz'; |
|
||||||
update sx_fields set currentlyused=0 |
|
||||||
where table_name='zul_k_stort' |
|
||||||
and name='tid'; |
|
||||||
|
|
||||||
--drop view if exists sos_stud_astat; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='zul_antr_aggr' |
|
||||||
and name not in ('summe'); |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='zul_antr_aggr' |
|
||||||
and name in ('summe'); |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
130 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn zul_antr_aggr_exists=1 |
|
||||||
@ -1,405 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="erfolg_ba_ma_uebergang_exists"> |
|
||||||
select sp_table_exists('erfolg_ba_ma_uebergang') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='erfolg_ba_ma_uebergang' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name , |
|
||||||
trim(name) || '_abschluss_vorher_1_' as prefix, |
|
||||||
caption ||' 1 (Abschluss vorher)' as caption, |
|
||||||
'dim_studiengang.tid=erfolg_ba_ma_uebergang.abschluss_vorher_tid_stg_1' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
union |
|
||||||
select 20::smallint as sortnr, |
|
||||||
name, |
|
||||||
trim(name) || '_abschlussart_vorher_' as prefix, |
|
||||||
caption ||' 1 (Abschlussart vorher)' as caption, |
|
||||||
'erfolg_ba_ma_uebergang.abschluss_vorher_abschlussart=erfolg_ba_ma_abschlussart.apnr and erfolg_ba_ma_abschlussart.key=1' as joinclause |
|
||||||
from sx_tables where name in ('erfolg_ba_ma_abschlussart') |
|
||||||
union |
|
||||||
select 30::smallint as sortnr, |
|
||||||
name, |
|
||||||
trim(name) || '_abschluss_vorher_' as prefix, |
|
||||||
caption ||' (Abschluss vorher)' as caption, |
|
||||||
'erfolg_ba_ma_uebergang.abschluss_vorher_abschluss=sos_k_abint.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_abint') |
|
||||||
union |
|
||||||
select 40::smallint as sortnr, |
|
||||||
name, |
|
||||||
trim(name) || '_einschr_nachher_' as prefix, |
|
||||||
caption ||' (Einschr. nachher)' as caption, |
|
||||||
'erfolg_ba_ma_uebergang.einschr_nachher_abschluss=k_abint.abint' as joinclause |
|
||||||
from sx_tables where name in ('k_abint') |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if erfolg_ba_ma_uebergang_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_erfolg_ba_ma_uebergang", "caption":"Übergang Bacherlor - Master"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='erfolg_ba_ma_uebergang' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='erfolg_ba_ma_uebergang' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
120 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn erfolg_ba_ma_uebergang_exists=1 |
|
||||||
@ -1,600 +0,0 @@ |
|||||||
|
|
||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="fin_konto_aggr_exists"> |
|
||||||
select sp_table_exists('fin_konto_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='fin_konto_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"><![CDATA[ |
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Kontostände' |
|
||||||
WHERE name='fin_konto_aggr'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Geldgeber' |
|
||||||
WHERE name='fin_geldgeber'; |
|
||||||
|
|
||||||
|
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'fin_geldgeber.ggnr=fin_konto_aggr.titelgruppe_gege' as joinclause |
|
||||||
from sx_tables where name in ('fin_geldgeber') |
|
||||||
|
|
||||||
]]></sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
and name in ('dritt','rechnungsjahr','buchungsab_fb','titelgruppe_gege','einnahmen_dr','ausgaben_dr','ch110_institut','fikr') |
|
||||||
|
|
||||||
union |
|
||||||
</#if> |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'fin_geldgeber_' || name as targetname |
|
||||||
from sx_fields where table_name ='fin_geldgeber' |
|
||||||
and currentlyused=1 |
|
||||||
and name in ('ggnr','ggdruck') |
|
||||||
|
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if fin_konto_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"fin_konto_aggr_gege", "caption":"Einnahmen/Ausgaben nach Geldgeber"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='fin_konto_aggr' |
|
||||||
and name not in ('hhans_tit', |
|
||||||
'hhans_dr', |
|
||||||
'verfuegbar_tit', |
|
||||||
'verfuegbar_dr', |
|
||||||
'verfuegbar_geld', |
|
||||||
'akt_soll_tit', |
|
||||||
'akt_soll_dr', |
|
||||||
'sperr_tit', |
|
||||||
'sperr_dr', |
|
||||||
'reste_tit', |
|
||||||
'reste_dr', |
|
||||||
'vojs_tit', |
|
||||||
'vojs_dr', |
|
||||||
'angeordneta_tit', |
|
||||||
'angeordneta_dr', |
|
||||||
'angeordnete_tit', |
|
||||||
'angeordnete_dr', |
|
||||||
'festgelegt_tit', |
|
||||||
'festgelegt_dr', |
|
||||||
'bewegungen', |
|
||||||
'ausz_dr', |
|
||||||
'ausz_tit', |
|
||||||
'ausgaben_dr', |
|
||||||
'ausgaben_tit', |
|
||||||
'ein_dr', |
|
||||||
'ein_tit', |
|
||||||
'einnahmen_dr', |
|
||||||
'einnahmen_tit', |
|
||||||
'ein_a', |
|
||||||
'ein_e', |
|
||||||
'soll_tit', |
|
||||||
'soll_dr', |
|
||||||
'offsoll_a_tit', |
|
||||||
'offsoll_a_dr', |
|
||||||
'offsoll_e_tit', |
|
||||||
'offsoll_e_dr', |
|
||||||
'offsolle_ohneaa', |
|
||||||
'bewill_f_s', |
|
||||||
'bewill_f_h', |
|
||||||
'bewill_f_sa', |
|
||||||
'bewill_f_ab_s', |
|
||||||
'bewill_f_ab_h', |
|
||||||
'bewill_f_ab_sa', |
|
||||||
'bewill_f_u_s', |
|
||||||
'bewill_f_u_h', |
|
||||||
'bewill_f_u_sa', |
|
||||||
'bewill_g_s', |
|
||||||
'bewill_g_h', |
|
||||||
'bewill_g_sa', |
|
||||||
'bewill_g_ab_s', |
|
||||||
'bewill_g_ab_h', |
|
||||||
'bewill_g_ab_sa', |
|
||||||
'bewill_g_u_s', |
|
||||||
'bewill_g_u_h', |
|
||||||
'bewill_g_u_sa', |
|
||||||
'forder_f_s', |
|
||||||
'forder_f_h', |
|
||||||
'forder_f_sa', |
|
||||||
'forder_f_ab_s', |
|
||||||
'forder_f_ab_h', |
|
||||||
'forder_f_ab_sa', |
|
||||||
'forder_f_u_s', |
|
||||||
'forder_f_u_h', |
|
||||||
'forder_f_u_sa', |
|
||||||
'forder_g_s', |
|
||||||
'forder_g_h', |
|
||||||
'forder_g_sa', |
|
||||||
'forder_g_ab_s', |
|
||||||
'forder_g_ab_h', |
|
||||||
'forder_g_ab_sa', |
|
||||||
'forder_g_u_s', |
|
||||||
'forder_g_u_h', |
|
||||||
'forder_g_u_sa', |
|
||||||
'geldbestand_s', |
|
||||||
'geldbestand_h', |
|
||||||
'geldbestand_sa', |
|
||||||
'einzahl_f_s', |
|
||||||
'einzahl_f_h', |
|
||||||
'einzahl_f_sa', |
|
||||||
'einzahl_g_s', |
|
||||||
'einzahl_g_h', |
|
||||||
'einzahl_g_sa', |
|
||||||
'auszahl_s', |
|
||||||
'auszahl_h', |
|
||||||
'auszahl_sa', |
|
||||||
'verbind_s', |
|
||||||
'verbind_h', |
|
||||||
'verbind_sa', |
|
||||||
'verbind_ab_s', |
|
||||||
'verbind_ab_h', |
|
||||||
'verbind_ab_sa', |
|
||||||
'verbind_u_s', |
|
||||||
'verbind_u_h', |
|
||||||
'verbind_u_sa', |
|
||||||
'verpflicht_s', |
|
||||||
'verpflicht_h', |
|
||||||
'verpflicht_sa', |
|
||||||
'verpflicht_ab_s', |
|
||||||
'verpflicht_ab_h', |
|
||||||
'verpflicht_ab_sa', |
|
||||||
'verpflicht_u_s', |
|
||||||
'verpflicht_u_h', |
|
||||||
'verpflicht_u_sa'); |
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='fin_konto_aggr' |
|
||||||
and name in ('hhans_tit', |
|
||||||
'hhans_dr', |
|
||||||
'verfuegbar_tit', |
|
||||||
'verfuegbar_dr', |
|
||||||
'verfuegbar_geld', |
|
||||||
'akt_soll_tit', |
|
||||||
'akt_soll_dr', |
|
||||||
'sperr_tit', |
|
||||||
'sperr_dr', |
|
||||||
'reste_tit', |
|
||||||
'reste_dr', |
|
||||||
'vojs_tit', |
|
||||||
'vojs_dr', |
|
||||||
'angeordneta_tit', |
|
||||||
'angeordneta_dr', |
|
||||||
'angeordnete_tit', |
|
||||||
'angeordnete_dr', |
|
||||||
'festgelegt_tit', |
|
||||||
'festgelegt_dr', |
|
||||||
'bewegungen', |
|
||||||
'ausz_dr', |
|
||||||
'ausz_tit', |
|
||||||
'ausgaben_dr', |
|
||||||
'ausgaben_tit', |
|
||||||
'ein_dr', |
|
||||||
'ein_tit', |
|
||||||
'einnahmen_dr', |
|
||||||
'einnahmen_tit', |
|
||||||
'ein_a', |
|
||||||
'ein_e', |
|
||||||
'soll_tit', |
|
||||||
'soll_dr', |
|
||||||
'offsoll_a_tit', |
|
||||||
'offsoll_a_dr', |
|
||||||
'offsoll_e_tit', |
|
||||||
'offsoll_e_dr', |
|
||||||
'offsolle_ohneaa', |
|
||||||
'bewill_f_s', |
|
||||||
'bewill_f_h', |
|
||||||
'bewill_f_sa', |
|
||||||
'bewill_f_ab_s', |
|
||||||
'bewill_f_ab_h', |
|
||||||
'bewill_f_ab_sa', |
|
||||||
'bewill_f_u_s', |
|
||||||
'bewill_f_u_h', |
|
||||||
'bewill_f_u_sa', |
|
||||||
'bewill_g_s', |
|
||||||
'bewill_g_h', |
|
||||||
'bewill_g_sa', |
|
||||||
'bewill_g_ab_s', |
|
||||||
'bewill_g_ab_h', |
|
||||||
'bewill_g_ab_sa', |
|
||||||
'bewill_g_u_s', |
|
||||||
'bewill_g_u_h', |
|
||||||
'bewill_g_u_sa', |
|
||||||
'forder_f_s', |
|
||||||
'forder_f_h', |
|
||||||
'forder_f_sa', |
|
||||||
'forder_f_ab_s', |
|
||||||
'forder_f_ab_h', |
|
||||||
'forder_f_ab_sa', |
|
||||||
'forder_f_u_s', |
|
||||||
'forder_f_u_h', |
|
||||||
'forder_f_u_sa', |
|
||||||
'forder_g_s', |
|
||||||
'forder_g_h', |
|
||||||
'forder_g_sa', |
|
||||||
'forder_g_ab_s', |
|
||||||
'forder_g_ab_h', |
|
||||||
'forder_g_ab_sa', |
|
||||||
'forder_g_u_s', |
|
||||||
'forder_g_u_h', |
|
||||||
'forder_g_u_sa', |
|
||||||
'geldbestand_s', |
|
||||||
'geldbestand_h', |
|
||||||
'geldbestand_sa', |
|
||||||
'einzahl_f_s', |
|
||||||
'einzahl_f_h', |
|
||||||
'einzahl_f_sa', |
|
||||||
'einzahl_g_s', |
|
||||||
'einzahl_g_h', |
|
||||||
'einzahl_g_sa', |
|
||||||
'auszahl_s', |
|
||||||
'auszahl_h', |
|
||||||
'auszahl_sa', |
|
||||||
'verbind_s', |
|
||||||
'verbind_h', |
|
||||||
'verbind_sa', |
|
||||||
'verbind_ab_s', |
|
||||||
'verbind_ab_h', |
|
||||||
'verbind_ab_sa', |
|
||||||
'verbind_u_s', |
|
||||||
'verbind_u_h', |
|
||||||
'verbind_u_sa', |
|
||||||
'verpflicht_s', |
|
||||||
'verpflicht_h', |
|
||||||
'verpflicht_sa', |
|
||||||
'verpflicht_ab_s', |
|
||||||
'verpflicht_ab_h', |
|
||||||
'verpflicht_ab_sa', |
|
||||||
'verpflicht_u_s', |
|
||||||
'verpflicht_u_h', |
|
||||||
'verpflicht_u_sa'); |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
3 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn fin_konto_aggr_exists=1 |
|
||||||
@ -1,417 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="man_kennz_aggr_exists"> |
|
||||||
select sp_table_exists('man_kennz_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='man_kennz_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'man_studiengang.tid_ref=man_kennz_aggr.studiengang' as joinclause |
|
||||||
from sx_tables where name in ('man_studiengang') |
|
||||||
union |
|
||||||
select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'man_organigramm.key_apnr=man_kennz_aggr.ch110_institut' as joinclause |
|
||||||
from sx_tables where name in ('man_organigramm') |
|
||||||
union |
|
||||||
select 20::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'man_catalogue.id=man_kennz_aggr.catalogue_id' as joinclause |
|
||||||
from sx_tables where name in ('man_catalogue') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if man_kennz_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_man_kennz_aggr", "caption":"Management Kennzahlen"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Institution' |
|
||||||
WHERE name='man_organigramm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienart' |
|
||||||
-- WHERE name = 'sos_k_stuart'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studiumstyp' |
|
||||||
-- WHERE name = 'sos_k_stutyp'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienform' |
|
||||||
-- WHERE name = 'sos_k_stufrm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Hörerstatus' |
|
||||||
-- WHERE name = 'sos_k_hrst'; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--drop view if exists sos_stud_astat; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='man_kennz_aggr' |
|
||||||
and name not in ('value','value1','value2'); |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='man_kennz_aggr' |
|
||||||
and name in ('value','value1','value2'); |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
200 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn man_kennz_aggr_exists=1 |
|
||||||
@ -1,472 +0,0 @@ |
|||||||
|
|
||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sva_pbv_aggr_exists"> |
|
||||||
select sp_table_exists('sva_pbv_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sva_pbv_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"><![CDATA[ |
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Personen-Grunddaten' |
|
||||||
WHERE name='sva_pgd'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Arbeitszeit' |
|
||||||
WHERE name='sva_paz'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Finanzierung' |
|
||||||
WHERE name='sva_pfi'; |
|
||||||
|
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_pgd.pgd_join_id=sva_pbv_aggr.personal_nr' as joinclause |
|
||||||
from sx_tables where name in ('sva_pgd') |
|
||||||
union select 5::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_paz.pgd_join_id=sva_pbv_aggr.personal_nr and sva_paz.pbv_nr=sva_pbv_aggr.besch_verh_nr and sva_pbv_aggr.d_besch_von between sva_paz.von and sva_paz.bis' as joinclause |
|
||||||
from sx_tables where name in ('sva_paz') |
|
||||||
union select 7::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_pfi.pfi_serial=sva_pbv_aggr.pfi_serial ' as joinclause |
|
||||||
from sx_tables where name in ('sva_pfi') |
|
||||||
union select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_k_dienstart.apnr=sva_pbv_aggr.ca107_dienstart' as joinclause |
|
||||||
from sx_tables where name in ('sva_k_dienstart') |
|
||||||
union select 20::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_k_amtsdienst.apnr=sva_pbv_aggr.ca108_amtsbez' as joinclause |
|
||||||
from sx_tables where name in ('sva_k_amtsdienst') |
|
||||||
union select 30::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_k_vertragsart.apnr=sva_pbv_aggr.vertart' as joinclause |
|
||||||
from sx_tables where name in ('sva_k_vertragsart') |
|
||||||
union select 40::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_k_bvlgruppe.apnr=sva_pbv_aggr.ca109_key_bvl' as joinclause |
|
||||||
from sx_tables where name in ('sva_k_bvlgruppe') |
|
||||||
union select 50::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_k_funktionsart.apnr=sva_pbv_aggr.funktionsart' as joinclause |
|
||||||
from sx_tables where name in ('sva_k_funktionsart') |
|
||||||
|
|
||||||
]]></sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
union |
|
||||||
</#if> |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_pgd_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_pgd' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_paz_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_paz' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_pfi_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_pfi' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_k_vertragsart_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_k_vertragsart' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_k_dienstart_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_k_dienstart' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_k_funktionsart_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_k_funktionsart' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_k_amtsdienst_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_k_amtsdienst' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_k_bvlgruppe_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_k_bvlgruppe' |
|
||||||
and currentlyused=1 |
|
||||||
order by 1 |
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sva_pbv_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"sva_pbv_aggr_pgd", "caption":"Personal"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sva_pbv_aggr' |
|
||||||
and name!='vzae'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sva_pbv_aggr' |
|
||||||
and name='vzae'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
6 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sva_pbv_aggr_exists=1 |
|
||||||
@ -1,384 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_lab_stg_exists"> |
|
||||||
select sp_table_exists('sos_lab_stg') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sos_lab_stg' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang.tid=sos_lab_stg.tid_stg' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sos_lab_stg_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_sos_lab_stg", "caption":"Prüfungen"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sos_lab_stg' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sos_lab_stg' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>', |
|
||||||
whereclause='and stichtag=(select ST.tid from sos_stichtag ST where ST.appl_key=''2'') and abschnitt=2 and pstatus=''BE'''; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sos_lab_aggr_exists=1 |
|
||||||
@ -1,443 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_exam_unit_dim_studiengang_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_resultset"> |
|
||||||
select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layouts = [{"uniquename":"rpta_exam_unit_dim_studiengang_note", |
|
||||||
"caption":"Prüfungsergebnisse", |
|
||||||
"rpta_resultset":"rpta_exam_unit_dim_studiengang", |
|
||||||
"whereclause":"((modulart=''P'' and sourcesystem=6) or (part=''MP'' and sourcesystem=5))", |
|
||||||
"description":"Prüfung und Noten" |
|
||||||
}] |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_stg", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Fach", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_abschluss", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Abschluss", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"sem_der_pruefung", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung_min_process", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung_min_process", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"min", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung (Min)", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung_max_process", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung_max_process", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"max", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung (Max)", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"elementnr", |
|
||||||
"srcfieldname":"elementnr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"pnr", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pdtxt", |
|
||||||
"srcfieldname":"pdtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Name der Prüfung", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":40, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"summe", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Teilnehmer", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":15, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_case", |
|
||||||
"srcfieldname":"note", |
|
||||||
"targetfieldname":"note_case", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"(case when note > 6 then null else note end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote % *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt", |
|
||||||
"srcfieldname":"note_case", |
|
||||||
"targetfieldname":"note_schnitt", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"avg", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt_case", |
|
||||||
"srcfieldname":"note_schnitt", |
|
||||||
"targetfieldname":"note_schnitt_case", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else note_schnitt end", |
|
||||||
"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, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_sum", |
|
||||||
"srcfieldname":"pstatus_nb", |
|
||||||
"targetfieldname":"pstatus_nb_sum", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchfallquote in % *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_quote", |
|
||||||
"srcfieldname":"pstatus_nb_sum", |
|
||||||
"targetfieldname":"pstatus_nb_quote", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else pstatus_nb_sum/summe::decimal(18,2)*100 end", |
|
||||||
"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, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pvermerk_ne_sum", |
|
||||||
"srcfieldname":"pvermerk_ne", |
|
||||||
"targetfieldname":"pvermerk_ne_sum", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"INTEGER", |
|
||||||
"caption":"Nicht erschienen", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":25, |
|
||||||
"description":""} |
|
||||||
|
|
||||||
|
|
||||||
] /> |
|
||||||
|
|
||||||
|
|
||||||
---ab hier nicht mehr ändern: |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
targetfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_visible smallint, |
|
||||||
visible_size smallint, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
sortnr integer, |
|
||||||
description TEXT, |
|
||||||
format_code_uniquename varchar(255), |
|
||||||
format_code_id integer |
|
||||||
); |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column_layout |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
resultset_id integer, |
|
||||||
whereclause text, |
|
||||||
description text |
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
|
|
||||||
insert into tmp_rpta_column_layout( |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
) |
|
||||||
select tid, |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
'${rpta_column_layout.caption}', |
|
||||||
'${rpta_column_layout.whereclause}', |
|
||||||
'${rpta_column_layout.description}' |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_column_layout.rpta_resultset}'; |
|
||||||
|
|
||||||
</#foreach > |
|
||||||
|
|
||||||
<#assign sortnr=0 /> |
|
||||||
<#foreach column in rpta_columns> |
|
||||||
<#assign sortnr=sortnr +1 /> |
|
||||||
|
|
||||||
INSERT INTO tmp_rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
is_aggregate, |
|
||||||
sortnr, |
|
||||||
description, |
|
||||||
format_code_uniquename |
|
||||||
) |
|
||||||
select R.tid, |
|
||||||
'${column.uniquename}', |
|
||||||
'${column.caption}', |
|
||||||
'${column.srcfieldname}', |
|
||||||
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>, |
|
||||||
T.tid as column_type, |
|
||||||
<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar </#if>, |
|
||||||
${column.is_visible}, |
|
||||||
${column.visible_size}, |
|
||||||
${column.is_aggregate}, |
|
||||||
${sortnr*10}, |
|
||||||
<#if column.description?exists>'${column.description}'<#else>null::varchar </#if>, |
|
||||||
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if> |
|
||||||
FROM rpta_resultset R, rpta_column_type T |
|
||||||
where R.uniquename='${rpta_resultset}' |
|
||||||
and T.uniquename='${column.column_type}'; |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
|
|
||||||
update tmp_rpta_column set format_code_id=C.tid |
|
||||||
from rpta_format_code C |
|
||||||
where C.uniquename=tmp_rpta_column.format_code_uniquename |
|
||||||
and format_code_uniquename is not null; |
|
||||||
|
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2layout |
|
||||||
from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column_layout_target |
|
||||||
from rpta_column_layout |
|
||||||
where resultset_id in (select tid |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_resultset}') |
|
||||||
and uniquename in (select uniquename from tmp_rpta_column_layout) |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_column_layout |
|
||||||
(uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description) |
|
||||||
select uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
FROM tmp_rpta_column_layout T |
|
||||||
where 0=(select count(*) from tmp_rpta_column_layout_target T2 |
|
||||||
where T.uniquename=T2.uniquename); |
|
||||||
|
|
||||||
drop table tmp_rpta_column_layout_target; |
|
||||||
|
|
||||||
delete from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2 |
|
||||||
from tmp_rpta_column T |
|
||||||
where (resultset_id,uniquename) not in |
|
||||||
(select resultset_id,uniquename from rpta_column); |
|
||||||
|
|
||||||
INSERT INTO rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
custom |
|
||||||
) |
|
||||||
select |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
0 as custom |
|
||||||
from tmp_rpta_column2; |
|
||||||
|
|
||||||
--evtl. neuen Satz einfügen, dann alle updaten |
|
||||||
|
|
||||||
update rpta_column set ( caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description) |
|
||||||
= (select caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description |
|
||||||
from tmp_rpta_column T |
|
||||||
where T.resultset_id=rpta_column.resultset_id |
|
||||||
and T.uniquename=rpta_column.uniquename) |
|
||||||
where custom=0 |
|
||||||
and (resultset_id,uniquename) in |
|
||||||
(select T.resultset_id,T.uniquename |
|
||||||
from tmp_rpta_column T) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column2; |
|
||||||
|
|
||||||
insert into rpta_column2layout(column_id, |
|
||||||
layout_id, |
|
||||||
sortnr, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
format_code_id) |
|
||||||
select C.tid as column_id, |
|
||||||
L.tid as layout_id, |
|
||||||
T.sortnr, |
|
||||||
T.is_visible, |
|
||||||
T.visible_size, |
|
||||||
T.caption, |
|
||||||
T.description, |
|
||||||
T.format_code_id |
|
||||||
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=T.resultset_id |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
and L.resultset_id=T.resultset_id |
|
||||||
; |
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table if exists tmp_rpta_column2; |
|
||||||
drop TABLE tmp_rpta_column_layout; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,92 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_installed"> |
|
||||||
select count(*) from systeminfo where tid=330; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"fin_ein_aus_gege", |
|
||||||
"caption":"Einnahmen/Ausgaben nach Geldgeber", |
|
||||||
"rpta_resultset":"fin_konto_aggr_gege", |
|
||||||
"whereclause":"", |
|
||||||
"description":"Einnahmen/Ausgaben nach Geldgeber Drittmittel" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"fibu_cifx_geldgebergruppe", |
|
||||||
"caption":"Geldgebergruppe", |
|
||||||
"srcfieldname":"fin_geldgeber_ggdruck", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr_minus_4", |
|
||||||
"caption":"2012", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"jahr_minus_4", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when rechnungsjahr = 2012 then einnahmen_dr else 0 end", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":10, |
|
||||||
"description":"2012" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr_minus_3", |
|
||||||
"caption":"2013", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"jahr_minus_3", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when rechnungsjahr = 2013 then einnahmen_dr else 0 end", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":10, |
|
||||||
"description":"2013" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr_minus_2", |
|
||||||
"caption":"2014", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"jahr_minus_2", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when rechnungsjahr = 2014 then einnahmen_dr else 0 end", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":10, |
|
||||||
"description":"2014" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr_minus_1", |
|
||||||
"caption":"2015", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"jahr_minus_1", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when rechnungsjahr = 2015 then einnahmen_dr else 0 end", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":10, |
|
||||||
"description":"2015" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr_minus_0", |
|
||||||
"caption":"2016", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"jahr_minus_0", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when rechnungsjahr = 2016 then einnahmen_dr else 0 end", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":10, |
|
||||||
"description":"2016" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<#if rpta_installed==1> |
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
</#if> |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_installed"> |
|
||||||
select count(*) from systeminfo where tid=330; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"pbv_dm_kurz", |
|
||||||
"caption":"Personal Drittmittel", |
|
||||||
"rpta_resultset":"sva_pbv_aggr_pgd", |
|
||||||
"whereclause":"", |
|
||||||
"description":"VZÄ nach Geldgeber Drittmittel ja/nein" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"ch110_besch_st", |
|
||||||
"caption":"Beschäftigungsstelle (Schlüssel)", |
|
||||||
"srcfieldname":"ch110_besch_st", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Beschäftigungsstelle (Schlüssel)" |
|
||||||
}, |
|
||||||
{"uniquename":"ch110_besch_st_str", |
|
||||||
"caption":"Beschäftigungsstelle", |
|
||||||
"srcfieldname":"ch110_besch_st_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select C.druck from cifx C where C.key=110 and C.apnr=ch110_besch_st", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Beschäftigungsstelle (Name)" |
|
||||||
}, |
|
||||||
{"uniquename":"drittmittel", |
|
||||||
"caption":"Drittmittel", |
|
||||||
"srcfieldname":"drittmittel", |
|
||||||
"targetfieldname":"drittmittel_str", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(case when drittmittel=1 then ''ja'' else ''nein'' end)::varchar", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"2", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Finanzierung aus Drittmitteln" |
|
||||||
}, |
|
||||||
{"uniquename":"vzae", |
|
||||||
"caption":"VZÄ (Beschäftigung)", |
|
||||||
"srcfieldname":"vzae", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<#if rpta_installed==1> |
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
</#if> |
|
||||||
@ -1,78 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_erfolg_ba_ma_uebergang_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_erfolg_ba_ma_uebergang'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"ba_ma_uebergang_nach_abschluss_fach", |
|
||||||
"caption":"Herkunftsstudiengang der Master-Studienanfänger_innen auf Abschlussebene", |
|
||||||
"rpta_resultset":"rpta_erfolg_ba_ma_uebergang", |
|
||||||
"whereclause":"richtung=''wg'' and einschr_nachher_abschlussart=''A37''", |
|
||||||
"description":"Übergang Bachelor-Master mit Aggregierung auf Abschluss und Fach beim vorherigen Abschluss und Abschluss beim nachfolgenden Studiengang" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_abschluss_vorher_1_stg_str", |
|
||||||
"caption_der_spalte":"Vorheriger Abschluss Fach", |
|
||||||
"caption_in_ergebnistabelle":"Fach bei Bachelor Abschluss eigene Hochschule", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss_vorher_1_stg_str", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Erstes Fach beim Bachelor Abschluss eigene Hochschule" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_k_abint_abschluss_vorher_druck", |
|
||||||
"caption_der_spalte":"Vorheriger Abschluss", |
|
||||||
"caption_in_ergebnistabelle":"Bachelor Abschluss eigene Hochschule", |
|
||||||
"srcfieldname":"sos_k_abint_abschluss_vorher_druck", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"fach_ba_ext", |
|
||||||
"caption_der_spalte":"Vorheriger Studiengang extern", |
|
||||||
"caption_in_ergebnistabelle":"Fach bei Bachelor Abschluss fremde Hochschule", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"fach_ba_ext", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select coalesce(trim(H.name) || ''-'' || K.name,F.hs || ''-'' || F.studienfach) from kenn_hochschulen H,k_astat_abschl_grp A,sos_pruefungenext F left outer join k_astat_studienfach_land K on (F.studienfach=''0'' || K.schluessel and K.land=5) where F.hs=H.hs_nr::varchar(10) and F.ang_abschl=A.abschluss_astat_bund and A.abschlussart=''A24'' and F.matrikel_nr=tmp_rpta_erfolg_ba_ma_uebergang.matrikel_nr and F.prfg_sem <= tmp_rpta_erfolg_ba_ma_uebergang.einschr_nachher_semester limit 1", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"k_abint_einschr_nachher_dtxt", |
|
||||||
"caption_der_spalte":"Nachfolgender Studiengang (Abschluss)", |
|
||||||
"caption_in_ergebnistabelle":"Master-Abschluss bei Studienbeginn", |
|
||||||
"srcfieldname":"k_abint_einschr_nachher_dtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption":"Summe der Studienfälle", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Summe der Studienfälle" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
@ -1,52 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_erfolg_ba_ma_uebergang_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_erfolg_ba_ma_uebergang'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"ba_ma_uebergang_nach_abschluss", |
|
||||||
"caption":"Übergang Bachelor-Master auf Abschlussebene", |
|
||||||
"rpta_resultset":"rpta_erfolg_ba_ma_uebergang", |
|
||||||
"whereclause":"richtung=''gw'' and abschluss_vorher_abschlussart=''A24''", |
|
||||||
"description":"Übergang Bachelor-Master mit Aggregierung auf Abschlussart sowohl beim vorherigen Abschluss als auch beim nachfolgenden Studiengang" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"sos_k_abint_abschluss_vorher_druck", |
|
||||||
"caption":"Vorheriger Abschluss", |
|
||||||
"srcfieldname":"sos_k_abint_abschluss_vorher_druck", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"k_abint_einschr_nachher_dtxt", |
|
||||||
"caption":"Nachfolgender Studiengang (Abschluss)", |
|
||||||
"srcfieldname":"k_abint_einschr_nachher_dtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption":"Summe der Studienfälle", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Summe der Studienfälle" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
@ -1,81 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_astat_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"internationale_studierende_sicht", |
|
||||||
"caption":"Internationale Studierende (Baum)", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"", |
|
||||||
"description":"Internationale Studierende mit Baumstruktur nach Studiengang-Sicht", |
|
||||||
"sortclause":"sortnr" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"dim_studiengang_s_tid_stg", |
|
||||||
"caption":"Studiengang Sichtelement-ID", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"s_tid_stg", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(''s_'' || tid_stg)::varchar(255)", |
|
||||||
"is_visible":"0", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"30", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_s_tid_stg_ebene", |
|
||||||
"caption":"Ebene", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"ebene", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"null::integer", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_sicht", |
|
||||||
"caption":"Studiengang", |
|
||||||
"srcfieldname":"s_tid_stg", |
|
||||||
"targetfieldname":"studiengang", |
|
||||||
"column_type":"treeColumn", |
|
||||||
"col_function":"Studiengang", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"30", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"ca12staat_str", |
|
||||||
"caption":"Staatsangehörigkeit (Name des Staates)", |
|
||||||
"srcfieldname":"ca12staat", |
|
||||||
"targetfieldname":"ca12staat_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select C2.druck from cif C2 where C2.key=12 and C2.apnr=ca12_staat", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Staat (Name)" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt", |
|
||||||
"caption_der_spalte":"Studierende ohne beurl.", |
|
||||||
"caption_in_ergebnistabelle":"Studierende ohne beurl.", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when kz_rueck_beur_ein<>4 then summe::integer else 0::integer end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"format_code":"MASK_ZERO_INT", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
|
|
||||||
] |
|
||||||
/> |
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
@ -1,76 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_man_kennz_aggr_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_man_kennz_aggr'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"man_kennz_aggr_studiengang", |
|
||||||
"caption":"Management Kennz. nach FB und Studiengang", |
|
||||||
"rpta_resultset":"rpta_man_kennz_aggr", |
|
||||||
"whereclause":"", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"sem", |
|
||||||
"caption":"Semester", |
|
||||||
"srcfieldname":"sem", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"man_organigramm_drucktext", |
|
||||||
"caption":"Institution", |
|
||||||
"srcfieldname":"man_organigramm_drucktext", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"abschluss_grp_str", |
|
||||||
"caption":"Abschlussgruppe", |
|
||||||
"srcfieldname":"abschluss_grp_str", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
|
|
||||||
{"uniquename":"man_studiengang_text", |
|
||||||
"caption":"Studiengang", |
|
||||||
"srcfieldname":"man_studiengang_text", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption_der_spalte":"Summe", |
|
||||||
"caption_in_ergebnistabelle":"Summe", |
|
||||||
"srcfieldname":"value", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description_der_spalte":"Summe", |
|
||||||
"description_in_ergebnistabelle":"" |
|
||||||
|
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
@ -1,129 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_man_kennz_aggr_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_man_kennz_aggr'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"man_kennz_aggr_tuhh_behoerdenbericht", |
|
||||||
"caption":"Management Kennz. des TUHH Behördenberichtes", |
|
||||||
"rpta_resultset":"rpta_man_kennz_aggr", |
|
||||||
"whereclause":"catalogue_id in (select catalogue_id from man_catalogue_rpt where report_id =''TUHH_KENNZ'')", |
|
||||||
"sortclause":"", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"catalogue_id", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - Kennzahl", |
|
||||||
"caption_in_ergebnistabelle":"ID der Kennzahl", |
|
||||||
"srcfieldname":"catalogue_id", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"jahr", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - Jahr", |
|
||||||
"caption_in_ergebnistabelle":"Jahr", |
|
||||||
"srcfieldname":"jahr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"man_catalogue_name", |
|
||||||
"caption_der_spalte":"Name der Kennzahl", |
|
||||||
"caption_in_ergebnistabelle":"Kennzahl", |
|
||||||
"srcfieldname":"man_catalogue_name", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"sem", |
|
||||||
"caption_der_spalte":"Semester", |
|
||||||
"caption_in_ergebnistabelle":"Semester", |
|
||||||
"srcfieldname":"sem", |
|
||||||
"targetfieldname":"sem", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"value1", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - Wert 1 der Kennzahl bei Prozentwerten", |
|
||||||
"caption_in_ergebnistabelle":"Wert 1 der Kennzahl bei Prozentwerten", |
|
||||||
"srcfieldname":"value1", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"value2", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - Wert 2 der Kennzahl bei Prozentwerten", |
|
||||||
"caption_in_ergebnistabelle":"Wert 2 der Kennzahl bei Prozentwerten", |
|
||||||
"srcfieldname":"value2", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"value", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - Wert der Kennzahl", |
|
||||||
"caption_in_ergebnistabelle":"Management Kennzahlen - Wert der Kennzahl", |
|
||||||
"srcfieldname":"value", |
|
||||||
"targetfieldname":"value", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"man_catalogue_calcratio", |
|
||||||
"caption_der_spalte":"Management Kennzahlen - : Quote", |
|
||||||
"caption_in_ergebnistabelle":"Management Kennzahlen - : Quote", |
|
||||||
"srcfieldname":"man_catalogue_calcratio", |
|
||||||
"targetfieldname":"man_catalogue_calcratio", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"wert_der_kennzahl_tuhh_behoerdenbericht", |
|
||||||
"caption_der_spalte":"Wert der Kennzahl", |
|
||||||
"caption_in_ergebnistabelle":"Wert der Kennzahl", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"wert_der_kennzahl_tuhh_behoerdenbericht", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when man_catalogue_calcratio>0 and man_catalogue_calcratio<100 then value1/value2 when man_catalogue_calcratio=100 then value1/value2*100 else value end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue