正 文

Oracle ERP导数据


www.7dspace.com  更新日期:2005-9-27 2:33:52  七度空间


  4、查看中转表中的记录数(以备导入数据后进行对比)

  select count(*) from cux_bill_temp;

  5、去除导入时在表bill.csv中的关键字段的空格字符,以免影响导入。

  update cux_bill_temp

  set ASSEMBLY_ITEM=replace(ASSEMBLY_ITEM,' ',''),

  COMPONENT_ITEM=replace(COMPONENT_ITEM,' ','');

  6、查看是否有重复的选项(既是否重复了Item)

  select assembly_item,component_item,min(row_num),count(*)

  from cux_bill_temp

  group by assembly_item,component_item

  having count(*)>1;

  如果有重复的Item,则要删除(或是重新合并)

  delete cux_bill_temp

  where row_num in (select min(row_num) from cux_bill_temp

  group by assembly_item,component_item

  having count(*)>1);

  以下步骤为选做(如有重复才做,没有重复不做7-10)

  7、再重新建立一个临时表(对于有重复数据,则只取一条数据,现取row_num最小的一条)

  drop table cux_bill_a;

  create table cux_bill_a

  as

  select assembly_item,

  component_item,

  component_quantity,

  PLANNING_FACTOR,

  component_yield_factor,

  supply_type,

  supply_subinventory,

  OPTIONAL_disp,

  MUTUALLY_EXCLUSIVE_O_disp,

  attribute1,

  min(row_num) row_num

  from cux_bill_temp

  group by assembly_item,

  component_item,

  component_quantity,

  PLANNING_FACTOR,

  component_yield_factor,

  supply_type,

  supply_subinventory,

  OPTIONAL_disp,

  MUTUALLY_EXCLUSIVE_O_disp,

  attribute1;

5页,当前在第2页  1  2  3  4  5  

上一篇:oracle用户创建权限何如分配
下一篇:MySQL安全性指南
作者:  来源:转载 ( 责任编辑:7dspace )
收藏此页】【打印】【关闭
站 内 搜 索
 

热 点 导 读
特 别 推 荐