--freemarker template
--FB-Schlüssel aus dem Campusmanagement werden zu Ressourcen Schlüsseln umgeschlüsselt
<#assign  fbs = [
  {"campus":"01", "ressourcen":"101"},
 {"campus":"02", "ressourcen":"102"},
 {"campus":"03", "ressourcen":"106"},
 {"campus":"04", "ressourcen":"107"}


  ] />

<#foreach fb in fbs>

update trans_cifx set apnr='${fb.ressourcen}' where key in (90,110) and apnr='${fb.campus}';
delete from cifx where key in (90,110) and apnr in ('${fb.campus}');
update lehr_stg_ab set fb='${fb.ressourcen}' where fb='${fb.campus}';
update dim_studiengang set fb='${fb.ressourcen}' where fb='${fb.campus}';
update k_abstgv set fb='${fb.ressourcen}' where fb='${fb.campus}';

</#foreach>


