由于数据采集,重复采集了一份数据,要删除,把方法记录一下,也留给需要的网友!
有好几种方法,我这里用的是rowid
表:gsm_pm_cell_h
方法:
红色字体表示关联条件
delete from gsm_pm_cell_h t where rowid not in(select max(rowid) from gsm_pm_cell_h t1 where t.i_cell_id=t1.i_cell_id and and XX=XX and XX=XX)
where t.i_omc_id=24 and t.dtm_repdate between to_date('2012-06-20','yyyy-mm-dd') and to_date('2012-06-20 23','yyyy-mm-dd hh24');
commit;
有更好的方法,可以恢复留言哦!一起进步!
有好几种方法,我这里用的是rowid
表:gsm_pm_cell_h
方法:
红色字体表示关联条件
delete from gsm_pm_cell_h t where rowid not in(select max(rowid) from gsm_pm_cell_h t1 where t.i_cell_id=t1.i_cell_id and and XX=XX and XX=XX)
where t.i_omc_id=24 and t.dtm_repdate between to_date('2012-06-20','yyyy-mm-dd') and to_date('2012-06-20 23','yyyy-mm-dd hh24');
commit;
有更好的方法,可以恢复留言哦!一起进步!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26940217/viewspace-733780/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26940217/viewspace-733780/