正 文

Oracle ERP导数据


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


  13、如果在mtl_system_items中,有不存在的物品ITEM时,要把其删除(或是把这些物品Item导入到系统中)

  删除:delete cux_bill_temp b

  where not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2);

  delete cux_bill_temp a

  where not exists (select null from mtl_system_items where segment1=a.assembly_item and organization_id=2);

  14、对没有物品Item的进行处理,把其放入另一临时表cux_item_temp中(以备查询及导入mtl_system_items表中)

  delete cux_item_temp;

  insert into cux_item_temp(

  segment1,description)

  select distinct item,item

  from (

  select distinct assembly_item item

  from cux_bill_temp b

  where not exists (select null from mtl_system_items where segment1=b.assembly_item and organization_id=2)

  union

  select distinct component_item item

  from cux_bill_temp b

  where not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2)

  )

  ;

  将找到没有ITEM的BOM数据放到另一个表中,以备下次ITEM导入后在导BOM

  create table cux_bom_temp1

  select distinct item

  from (

  select distinct assembly_item item

  from cux_bill_temp b

  where not exists (select null from mtl_system_items where segment1=b.assembly_item and organization_id=2)

  union

  select distinct component_item item

  from cux_bill_temp b

  where not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2)

  )

  15、从表mtl_system_items中把物品的编码ID加入中转表cux_bill_temp表(从项目主组织)中

  update cux_bill_temp b

  set assembly_item_id=(select inventory_item_id from mtl_system_items

  where segment1=b.assembly_item and organization_id=2),

  component_item_id=(select inventory_item_id from mtl_system_items

  where segment1=b.component_item and organization_id=2);

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

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

热 点 导 读
特 别 推 荐