Daniel Quathamer
8 months ago
2 changed files with 71 additions and 63 deletions
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
truncate table sxc_stud_sem_da_geschl_hs; |
||||
|
||||
insert into sxc_stud_sem_da_geschl_hs( |
||||
statistik_code, |
||||
statistik_label, |
||||
zeit_code, |
||||
zeit_label, |
||||
zeit, |
||||
semester, |
||||
merkmal_code_1, |
||||
merkmal_label_1, |
||||
auspraegung_code_1, |
||||
auspraegung_label_1, |
||||
merkmal_code_2, |
||||
merkmal_label_2, |
||||
auspraegung_code_2, |
||||
auspraegung_label_2, |
||||
merkmal_code_3, |
||||
merkmal_label_3, |
||||
auspraegung_code_3, |
||||
auspraegung_label_3, |
||||
merkmal_code_4, |
||||
merkmal_label_4, |
||||
auspraegung_code_4, |
||||
auspraegung_label_4, |
||||
hs_nr, |
||||
bil002__studierende__anzahl, |
||||
bil002__studierende__q) |
||||
select statistik_code, |
||||
statistik_label, |
||||
zeit_code, |
||||
zeit_label, |
||||
zeit, |
||||
val(substring(zeit from 4 for 4) || '2') as semester, |
||||
merkmal_code_1, |
||||
merkmal_label_1, |
||||
auspraegung_code_1, |
||||
auspraegung_label_1, |
||||
merkmal_code_2, |
||||
merkmal_label_2, |
||||
auspraegung_code_2, |
||||
auspraegung_label_2, |
||||
merkmal_code_3, |
||||
merkmal_label_3, |
||||
auspraegung_code_3, |
||||
auspraegung_label_3, |
||||
merkmal_code_4, |
||||
merkmal_label_4, |
||||
auspraegung_code_4, |
||||
auspraegung_label_4, |
||||
substring(auspraegung_code_4 from 3 for 4) as hs_nr, |
||||
bil002__studierende__anzahl, |
||||
bil002__studierende__q |
||||
FROM sxc_stud_sem_da_geschl_hs_neu |
||||
where auspraegung_code_3 is not null |
||||
and auspraegung_code_2 is not null |
||||
|
||||
|
||||
; |
||||
|
||||
update sxc_stud_sem_da_geschl_hs set hs_nr=(select K.hs_nr_kenn |
||||
from sxc_trans_hs_nr K |
||||
where K.hs_nr_sourcesystem=sxc_stud_sem_da_geschl_hs.hs_nr) |
||||
where exists (select K.hs_nr_kenn |
||||
from sxc_trans_hs_nr K |
||||
where K.hs_nr_sourcesystem=sxc_stud_sem_da_geschl_hs.hs_nr); |
||||
|
||||
|
Loading…
Reference in new issue