select

msi.segment1                                         装配件编码,
       msi.description                                        装配件描述,
       bos.operation_seq_num                                    序号,
       bso.operation_code                                     工序代码,
       bd.department_code                                         部门,
       bos.operation_description                            工序说明,
       bor.completion_subinventory                       完工子库,
       bors.resource_seq_num                              资源序号,
       br.resource_code                                        资源代码,
       br.description                                             资源说明,
       br.unit_of_measure                                     资源单位,
       bors.assigned_units                                          人数,
       decode(bors.basis_type, '1', '物料', '2', '批次') 计费基准,
       bors.usage_rate_or_amount                     单位使用量,
       bors.usage_rate_or_amount_inverse                  倒数,
       decode(bors.autocharge_type, '1', 'WIP移动', '2', '人工', '3','PO接收', '4', 'PO移动') 计费类型,
       decode(bors.attribute1, 'Y', '是', 'N', '否')        是否预估
  from inv.mtl_system_items_b          msi,
       bom.bom_departments                bd,
       bom.bom_resources                     br,
       bom.bom_operational_routings   bor,
       bom.bom_operation_sequences  bos,
       bom.bom_operation_resources  bors,
       bom.bom_standard_operations    bso
 where msi.inventory_item_id = bor.assembly_item_id
   and msi.organization_id = bor.organization_id
   and bor.routing_sequence_id = bos.routing_sequence_id
   and bso.standard_operation_id(+) = bos.standard_operation_id
   and bos.department_id = bd.department_id
   and bd.organization_id = bor.organization_id
   and bors.operation_sequence_id = bos.operation_sequence_id(+)
   and bors.resource_id = br.resource_id(+)
   and bor.organization_id(+) = br.organization_id
   and msi.organization_id = x
   and msi.inventory_item_status_code <> 'Inactive'
   and bos.disable_date is null
union
select msi.segment1                                        装配件编码,
       msi.description                                         装配件描述,
       bos.operation_seq_num                                     序号,
       bso.operation_code                                      工序代码,
       bd.department_code                                          部门,
       bos.operation_description                             工序说明,
       bor.completion_subinventory                        完工子库,
       to_number('')                                              资源序号,
       '' 资源代码,
       '' 资源说明,
       '' 资源单位,
       to_number('') 人数,
       '' 计费基准,
       to_number('') 单位使用量,
       to_number('') 倒数,
       '' 计费类型,
       '' 是否预估
from inv.mtl_system_items_b                     msi,
        bom.bom_departments                        bd,
        bom.bom_operational_routings            bor,
        bom.bom_operation_sequences           bos,
        bom.bom_standard_operations            bso
 where msi.inventory_item_id = bor.assembly_item_id
   and msi.organization_id = bor.organization_id
   and bor.routing_sequence_id = bos.routing_sequence_id
   and bso.standard_operation_id(+) = bos.standard_operation_id
   and bos.department_id = bd.department_id
   and bd.organization_id = bor.organization_id
   and msi.organization_id = x
   and msi.inventory_item_status_code <> 'Inactive'
   and bos.disable_date is null
   and not exists
 (select 'X'
          from bom.bom_operation_resources bors
         where bors.operation_sequence_id = bos.operation_sequence_id)

Oracle EBS-SQL (BOM-14):检查工艺路线明细.sql的更多相关文章

  1. Oracle EBS-SQL (BOM-18):检查BOM与工艺路线对照.sql

    /*有工艺路线,无BOM清单*/ select msi.segment1, msi.description from apps.BOM_OPERATIONAL_ROUTINGS bor, apps.m ...

  2. Oracle EBS-SQL (PO-4):检查采购订单明细.sql

    SELECT PHA.SEGMENT1                  订单号, pha.approved_flag           批准状态, pha.closed_code        订 ...

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

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

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

  5. [Oracle EBS APIs]import Flow routing and DJ routing using BOM_RTG_PUB.PROCESS_RTG APIs

    DJ routing --BOM模块的工艺路线 Flow routing -- Flow Manufacturing 模块使用的工艺路线,导入 Flow routing时先导入Line Operati ...

  6. MS SQL巡检系列——检查外键字段是否缺少索引

    前言感想:一时兴起,突然想写一个关于MS SQL的巡检系列方面的文章,因为我觉得这方面的知识分享是有价值,也是非常有意义的.一方面,很多经验不足的人,对于巡检有点茫然,不知道要从哪些方面巡检,另外一方 ...

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

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

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

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

  9. PO ITEM_BOM_工艺路线SQL

    ---物料主数据接口 SELECT count(*)PO_MARA FROM STG.PO_MARA; SELECT count(*)PO_MARC FROM STG.PO_MARC; SELECT ...

随机推荐

  1. basename $0的用法

    basename 从文件名中去掉路径信息, 只打印出文件名. 结构 basename $0 可以让脚本知道它自己的名字, 也就是, 它被调用的名字. 可以用来显示用法信息, 比如如果你调用脚本的时候缺 ...

  2. Android jar包混淆

    具体可参考http://proguard.sourceforge.net/manual/examples.html#library 1.找到android的adt目录下的 D:\soft\adt-bu ...

  3. poj 1699 Best Sequence

    http://poj.org/problem?id=1699 题意:给你n个长度为L的序列,求包含这几个序列的最短长度. 先预处理每两个序列之间的关系,然后dfs枚举就行. #include < ...

  4. QT---线程间通信(要先编译libqt-mt.so?)

    在 Qt 系统中,运行着一个GUI 主事件线程,这个主线程从窗口系统中获取事件,并将它们分发到各个组件去处理.在 QThread 类中有一种从非主事件线程中将事件提交给一个对象的方法,也就是 QThr ...

  5. SSRS 请求并显示SharePoint人员和组字段

    场景: 使用Reporting Service请求SharePoint List,该list中包含人员和组字段.要求:只显示人员或组的display name.示例如下: 项目 参与人员 期望显示 项 ...

  6. 007.androidUI开发进阶(基础--案例) .

    1.Dialog有四种,分别是AlertDialog,ProgressDialog,DatePickerDialog,TimePickerDialog 1.1AlertDialog public cl ...

  7. GNU C - 关于8086的内存访问机制以及内存对齐(memory alignment)

    一.为什么需要内存对齐? 无论做什么事情,我都习惯性的问自己:为什么我要去做这件事情? 是啊,这可能也是个大家都会去想的问题, 因为我们都不能稀里糊涂的或者.那为什么需要内存对齐呢?这要从cpu的内存 ...

  8. LeeCode-Merge Sorted Array

    Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:Yo ...

  9. django 启动和请求

    Django运行方式 调试模式 直接 python manage.py runserver python manage.py runserver python manage.py runserver ...

  10. poj1080--Human Gene Functions(dp:LCS变形)

    Human Gene Functions Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 17206   Accepted:  ...