select concat('update EXECUTION_PERIOD set DEPARTMENT_ADM_OFFICE_CREDITS_PERIOD_INTERVAL = "net.sourceforge.fenixedu.domain.time.calendarStructure.TeacherCreditsFillingCE:' , ACADEMIC_CALENDAR_ENTRY.ID_INTERNAL , '" where DEPARTMENT_ADM_OFFICE_CREDITS_PERIOD_BEGIN like "' , ACADEMIC_CALENDAR_ENTRY.BEGIN , '";') as "" from ACADEMIC_CALENDAR_ENTRY where OJB_CONCRETE_CLASS like '%TeacherCredits%' and CREDITS_ENTITY like '%DEPARTMENT%';
select concat('update EXECUTION_PERIOD set DEPARTMENT_ADM_OFFICE_CREDITS_PERIOD_INTERVAL = concat(DEPARTMENT_ADM_OFFICE_CREDITS_PERIOD_INTERVAL, ":",' , ID_INTERNAL  , ');') as "" from ACADEMIC_CALENDAR_ENTRY where OJB_CONCRETE_CLASS like '%Root%';
 
select concat('update EXECUTION_PERIOD set TEACHER_CREDITS_PERIOD_INTERVAL = "net.sourceforge.fenixedu.domain.time.calendarStructure.TeacherCreditsFillingCE:' , ACADEMIC_CALENDAR_ENTRY.ID_INTERNAL , '" where TEACHER_CREDITS_PERIOD_BEGIN like "' , ACADEMIC_CALENDAR_ENTRY.BEGIN , '";') as "" from ACADEMIC_CALENDAR_ENTRY where OJB_CONCRETE_CLASS like '%TeacherCredits%' and CREDITS_ENTITY like '%Teacher%';
select concat('update EXECUTION_PERIOD set TEACHER_CREDITS_PERIOD_INTERVAL = concat(TEACHER_CREDITS_PERIOD_INTERVAL, ":",' , ID_INTERNAL  , ');') as "" from ACADEMIC_CALENDAR_ENTRY where OJB_CONCRETE_CLASS like '%Root%';
