

delete from costage_st_studienstatus
where st_sem_nr in (select distinct st_sem_nr
from costage_st_studienstatus_neu);

insert into costage_st_studienstatus(st_studienstatus_nr,
       st_studium_nr,
       studienstatustyp,
       beginn_datum,
       gueltig_ab,
       st_sem_nr)
select st_studienstatus_nr,
       st_studium_nr,
       studienstatustyp,
       beginn_datum,
       gueltig_ab,
       st_sem_nr
from costage_st_studienstatus_neu;

