

delete from  TARIFFE_EXTRA_CALENDARIO 


insert into TARIFFE_EXTRA_CALENDARIO
select c.idcalend, at.idtariffan from calendario c inner join tariffe t on t.idtariffa=c.idtariffa inner join associazione_tariffa_extra at on  at.idtariffan=t.idtariffa
where c.data_ora>=sysdate
