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. c++基础五个题(二)

    一.c++中static的作用 1.隐藏:当同时编译多个文件时,所有未加static前缀的全局变量和函数都具有全局可见性,static函数作用就是为了隐藏 2.可以保持变量的持久:存储在静态数据区的变 ...

  2. Expedition(优先队列)

    Expedition 点我 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9465   Accepted: 2760 Des ...

  3. 居然因为交换错了好几把。。。。,还有坑点是num1可以大于num2

    完数 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submissi ...

  4. 当浏览器输入url的时候发生了什么

    当用户在浏览器地址栏里面输入一个url的时候.接下来会发生一系列的过程.首先是DNS解析, 将域名转换成对应的IP地址,之后浏览器与远程Web服务器通过TCP三次握手协商来建立一个TCP/IP连接.该 ...

  5. Qt带来的是更加低廉的开发成本和学习成本,对于很多小公司而言,这种优势足以让他们获得更大的利润空间 good

    不能单纯从技术上来看待这个问题,Qt本来是小众的开发平台,个人认为,它的出现只是解决特性场景的特定问题,Qt带来的是更加低廉的开发成本和学习成本,对于很多小公司而言,这种优势足以让他们获得更大的利润空 ...

  6. jQuery插件之Form

    一.jQuery.Form.js 插件的作用是实现Ajax提交表单. 方法: 1.formSerilize() 用于序列化表单中的数据,并将其自动整理成适合AJAX异步请求的URL地址格式. 2.cl ...

  7. Silverlight 结合ArcGis

    原文 http://www.dotblogs.com.tw/justforgood/archive/2012/05/09/72064.aspx 终于有机会谈到ArcGis(觉得很冷门) ,不过既然都做 ...

  8. icmp的报文,Destination Host Unreachable

    icmp的报文,Destination Host Unreachable的意思如下: http://www.corenetworkz.com/2009/05/destination-host-unre ...

  9. Impala 4、Impala JDBC

    • 配置: – impala.driver=org.apache.hive.jdbc.HiveDriver – impala.url=jdbc:hive2://node2:21050/;auth=no ...

  10. EasyUI DataGrid编辑单元格时使用combogrid

    仅提供一段columns配置代码供参考: conditions对象是一个已赋值的数组对象集合.下拉框数据可直接使用conditions数据,也可以通过url获取. columns : [[ { fie ...