select concat('update LESSON set LESSON.FREQUENCY = ', ROOM_OCCUPATION.FREQUENCY ,' where LESSON.ID_INTERNAL = ', ROOM_OCCUPATION.KEY_LESSON, ';') as '' from ROOM_OCCUPATION where ROOM_OCCUPATION.FREQUENCY is not null and ROOM_OCCUPATION.KEY_LESSON is not null;
select concat('update LESSON set LESSON.WEEK_OF_QUINZENAL_START = ', ROOM_OCCUPATION.WEEK_OF_QUINZENAL_START ,' where LESSON.ID_INTERNAL = ', ROOM_OCCUPATION.KEY_LESSON, ';') as '' from ROOM_OCCUPATION where ROOM_OCCUPATION.WEEK_OF_QUINZENAL_START is not null and ROOM_OCCUPATION.KEY_LESSON is not null;