ems:
select * from etc_ems t where t.SL_TIME > '2009-11-01' order by t.sl_time desc;
create table his_etc_ems as select * from etc_ems t where t.SL_TIME <= '2009-11-01';
delete etc_ems t where t.id in(select id from his_etc_ems);
ems:
select * from etc_ems t where t.SL_TIME > '2009-11-01' order by t.sl_time desc;
create table his_etc_ems as select * from etc_ems t where t.SL_TIME <= '2009-11-01';
delete etc_ems t where t.id in(select id from his_etc_ems);