zoukankan      html  css  js  c++  java
  • Oracle EBS-SQL (CST-4):检查组织间项目成本.sql

    select
           i1.segment1                                                                           项目
          ,i1.description                                                                    项目描述
          ,i1.PRIMARY_UNIT_OF_MEASURE                                              单位
          ,decode(i1.item_type,'P','采购件','SA','子配件','FG','成品') 组织1项目类型
          ,decode(i2.item_type,'P','采购件','SA','子配件','FG','成品') 组织2项目类型
          ,c1.item_cost                                                                   组织1成本
          ,c2.item_cost                                                                   组织2成本
    from
           bom.cst_item_costs                   c2
          ,bom.cst_item_costs                   c1
          ,inv.mtl_system_items_b             i2
          ,inv.mtl_system_items_b             i1
    where
           --nvl(c1.item_cost,0) <> nvl(c2.item_cost,0)         and
             c1.inventory_item_id(+) = i1.inventory_item_id   and
             c1.cost_type_id(+) = 3                                       and    --冻结成本
             c1.organization_id(+) =  i1.organization_id           and
             c2.inventory_item_id(+)  =  i2.inventory_item_id  and
             c2.cost_type_id(+) = 1                                        and --冻结成本
             c2.organization_id(+) =  i2.organization_id           and  
             i2.organization_id = X2                                        and
             i2.inventory_item_id = i1.inventory_item_id          and
             i1.organization_id = X1                                       and
            (i1.inventory_item_status_code <> 'Inactive' and i2.inventory_item_status_code <> 'Inactive')
     
      

  • 相关阅读:
    牛客网 二叉树的镜像 JAVA
    牛客网 反转链表 JAVA
    牛客网 调整数组顺序使奇数位于偶数前面 JAVA
    Integer to Roman LeetCode Java
    Valid Number leetcode java
    Longest Common Prefix
    Wildcard Matching leetcode java
    Regular Expression Matching
    Longest Palindromic Substring
    Add Binary LeetCode Java
  • 原文地址:https://www.cnblogs.com/st-sun/p/3782317.html
Copyright © 2011-2022 走看看