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开发,软件架构设计、分布式相关、项目管理、前端设计等等,实战派...
  • 相关阅读:
    使用Spring提供的缓存抽象机制整合EHCache为项目提供二级缓存
    Spring使用Cache、整合Ehcache(转)
    每天学习SQL
    多线程
    ### The error may involve defaultParameterMap ### The error occurred while setting parameters
    日志分表
    Quartz学习(转)
    Quartz中时间表达式的设置-----corn表达式 (转)(http://www.cnblogs.com/GarfieldTom/p/3746290.html)
    分享一个测试图片的方式
    阿里云ECS配置踩坑之路
  • 原文地址:https://www.cnblogs.com/zqmingok/p/2138102.html
Copyright © 2011-2022 走看看