用java将access几十万条数据中的新数据insert到oracle,有什么高效的方法?
现在遇到一个问题:
应用周期性地将上传地access数据库的新数据导入oracle中,只要oracle中没有的数据都导入到oracle中。access数据库中记录有30万条左右,每次地新数据可能1000条左右。不知道大家有什么好地方法或建议?江湖救急亚!

解决方案 »

  1.   

    将access的数据先导入到一个临时表中,然后将临时表中数据插入主表:
    如:
    insert into a  
    select id,age from b where  not exists (select id,age from a where a.id=b.id and a.age=b.age);插入完后将临时表清空。当然更好的是不清空,这样还能留下上传的历史数据,只要在表中假如上传的版本即可