select rownum seq_num,

lpad(to_char(level), decode(level, 1, 1, level + 1), '.') bom_level,

bbm.ASSEMBLY_ITEM_ID,

msi.segment1 assembly_item,

msi.description assembly_description,

bbm.COMMON_ASSEMBLY_ITEM_ID,

bic.item_NUM,

bbm.COMMON_BILL_SEQUENCE_ID,

bbm.BILL_SEQUENCE_ID,

msic.segment1 component_item,

msic.description c_item_description,

bic.COMPONENT_ITEM_ID,

bic.COMPONENT_QUANTITY,

msic.primary_unit_of_measure,

bic.COMPONENT_YIELD_FACTOR,

bic.EFFECTIVITY_DATE,

bic.ATTRIBUTE1,

bic.ATTRIBUTE2,

bic.CHANGE_NOTICE,

ood.ORGANIZATION_CODE,

ood.ORGANIZATION_NAME,

ood.ORGANIZATION_ID

from bom_bill_of_materials         bbm,

bom_inventory_components     bic,

mtl_system_items_b               msi,

mtl_system_items_b             msic,

org_organization_definitions    ood

where bbm.ASSEMBLY_ITEM_ID = msi.inventory_item_id

and bbm.ORGANIZATION_ID = msi.organization_id

and bic.COMPONENT_ITEM_ID = msic.inventory_item_id

and bic.PK2_VALUE = msic.organization_id

and bbm.BILL_SEQUENCE_ID = bic.BILL_SEQUENCE_ID

and (bic.DISABLE_DATE is null or bic.DISABLE_DATE >= sysdate)

and bic.EFFECTIVITY_DATE <= sysdate

and ood.ORGANIZATION_ID = msi.organization_id

and ood.ORGANIZATION_id = X

connect by bbm.ASSEMBLY_ITEM_ID = prior bic.COMPONENT_ITEM_ID

start with msi.segment1 in (select msi.segment1

from inv.mtl_system_items_b msi

where msi.organization_id = X

---and msi.segment1 like '10%'

and msi.item_type = 'FG')

Oracle EBS-SQL (BOM-16):检查多层BOM.sql的更多相关文章

  1. Oracle EBS-SQL (BOM-15):检查多层BOM(含common BOM).sql

    select       distinct b.lvl                                                      层次, b.OPERATION_SEQ ...

  2. Oracle EBS 隐藏帮助-诊断-检查

  3. Oracle EBS-SQL (BOM-10):检查有BOM无计划员的数据.sql

    select DISTINCT     msi.segment1 编码    ,msi.description 描述    ,msi.item_type 物料类型    ,msi.inventory_ ...

  4. Oracle EBS-SQL (BOM-5):检查有BOM但物料状态为NEW的物料.sql

    select DISTINCT     msi.segment1 成品编码    ,msi.description 成品描述    ,msi.item_type 物料类型    ,msi.invent ...

  5. Oracle EBS BOM模块常用表结构

    表名: bom.bom_bill_of_materials  说明: BOM清单父项目  BILL_SEQUENCE_ID NUMBER 清单序号(关键字)ASSEMBLY_ITEM_ID NUMBE ...

  6. Oracle EBS DBA常用SQL - 安装/补丁【Z】

    Oracle EBS DBA常用SQL - 安装/补丁 检查应用补丁有没有安装:select bug_number,last_update_date from ad_bugs where bug_nu ...

  7. Oracle EBS中分类账和法人实体 的关系(有sql语句实例)

    Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报  分类: Oracle EBS(12)  Oracle数据 ...

  8. 六、K3 WISE 开发插件《直接SQL报表开发新手指导 - BOM成本报表》

    ======================== 目录: 1.直接SQL报表 ======================== 1.直接SQL报表 以BOM成本报表为例,在销售模块部署,需要购买[金蝶 ...

  9. oracle锁表查询,资源占用,连接会话,低效SQL等性能检查

    查询oracle用户名,机器名,锁表对象 select l.session_id sid, s.serial#, l.locked_mode, l.oracle_username, l.os_user ...

随机推荐

  1. PAT 1059. Prime Factors (25) 质因子分解

    题目链接 http://www.patest.cn/contests/pat-a-practise/1059 Given any positive integer N, you are suppose ...

  2. Java 学习 第二篇;面向对象 定义类的简单语法:

    1:基本知识 [public / protected / private] class 类名 { 零个到多个构造器定义; 零个到多个属性; 零个到多个方法; } 其中类中各个成员之间的顺序没有关系,且 ...

  3. LeetCode_Jump Game II

    Given an array of non-negative integers, you are initially positioned at the first index of the arra ...

  4. perl 创建文本框

    my $mw = MainWindow->new(-title => "Mem monitor"); $frm_name1 = $mw -> Frame()-&g ...

  5. 【转】arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别

    原文网址:http://www.veryarm.com/296.html 命名规则 交叉编译工具链的命名规则为:arch [-vendor] [-os] [-(gnu)eabi] arch - 体系架 ...

  6. Word Search II 解答

    Question Given a 2D board and a list of words from the dictionary, find all words in the board. Each ...

  7. java模拟get/post提交

    1:用jdk连接 String action = "xxxxxxxxxxx": URL url = new URL(action); HttpURLConnection http ...

  8. Ruby中,&:(ampersand colon)的用法

    前几日看Ruby代码,发现一个奇怪的用法,如下: a=['a', 'b', 'c'].map! &:upcase p a #["A", "B", &qu ...

  9. 第五章 Logistic回归

    第五章 Logistic回归 假设现在有一些数据点,我们利用一条直线对这些点进行拟合(该线称为最佳拟合直线),这个拟合过程就称作回归. 为了实现Logistic回归分类器,我们可以在每个特征上都乘以一 ...

  10. HDU2037 贪心 动归均可+证明

    今年暑假不AC Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...