select concat('delete from COURSE_LOAD where ID_INTERNAL = ' , COURSE_LOAD.ID_INTERNAL , ';') as "" from COURSE_LOAD inner join EXECUTION_COURSE EC on EC.ID_INTERNAL = COURSE_LOAD.KEY_EXECUTION_COURSE where COURSE_LOAD.TYPE not in (select SHIFT.TIPO from SHIFT inner join EXECUTION_COURSE on EXECUTION_COURSE.ID_INTERNAL = SHIFT.KEY_DISCIPLINA_EXECUCAO where EXECUTION_COURSE.ID_INTERNAL = EC.ID_INTERNAL);
