zoukankan      html  css  js  c++  java
  • BOM递归查询小实例

    查询某个原物料下的子组件:

    select level,
           t.*
      from (select items1.segment1 segment1_m,
                   items1.inventory_item_id m_id,
                   items1.description description_m,
                   materials.bill_sequence_id,
                   components.item_num,
                   components.operation_seq_num,
                   components.component_item_id sub_id,
                   items2.segment1 segment1_sub,
                   items2.description description_sub,
                   components.component_quantity,
                   components.EFFECTIVITY_DATE,
                   components.DISABLE_DATE
              from bom_bill_of_materials    materials,
                   mtl_system_items_b       items1,
                   bom_inventory_components components,
                   mtl_system_items_b       items2
             where materials.assembly_item_id = items1.inventory_item_id
               and materials.bill_sequence_id = components.bill_sequence_id
               and components.component_item_id = items2.inventory_item_id
               and items2.organization_id = 103
               and materials.organization_id = 103
               and items1.organization_id = 103
               and components.EFFECTIVITY_DATE <= sysdate
               and nvl(components.DISABLE_DATE,sysdate+1) > sysdate
               ) t
    connect by prior t.segment1_sub = t.segment1_m
     start with t.segment1_m = 'S-7BR1AUX-B1';

    --connect by prior t.sub_id = t.m_id
    -- start with t.m_id = '19044'

    keim,毕业于安徽科技学院理学院,2003年开始对Web开发有浓厚的兴趣,并专注于C#/java Web开发,软件架构设计、分布式相关、项目管理、前端设计等等,实战派...
  • 相关阅读:
    闻彭水诗人醉酒攀岩写诗
    点滴记录:管理工作的50点亲身感悟(分享!)
    激发潜能 成就梦想:抱着积极的心态开发你的潜能
    成功者的十二项核心因素——最切实的成功法则
    free buffer waits等待事件
    latch: library cache pin等待事件
    ksfd: async disk IO等待事件
    latch:library cache lock等待事件
    library cache latch等待事件
    在Fedora 15上使用Vmware Server 2.0.2
  • 原文地址:https://www.cnblogs.com/zqmingok/p/2138102.html
Copyright © 2011-2022 走看看