select
      msi.segment1           物料编码,
      msi.description          物料描述,
      sum(rs.quantity)     接收中数量,
      ph.segment1             采购订单,
      pl.line_num                  订单行,
      pl.quantity              订单行数量,
      rsh.receipt_num           收据号,
      rsh.bill_of_lading          提单号
from

po.rcv_supply rs,
      inv.mtl_system_items_b msi,
      po.po_headers_all ph,
      po.po_lines_all pl,
      po.rcv_shipment_headers rsh,
      po.rcv_shipment_lines rsl
where

rs.supply_type_code = 'RECEIVING'
  and rs.to_organization_id = X
  and rs.quantity <> 0
  and rs.item_id = msi.inventory_item_id
  and rs.to_organization_id = msi.organization_id
  and rs.po_header_id = ph.po_header_id
  and rs.po_line_id = pl.po_line_id
  and ph.org_id = Y
  and pl.org_id = Y
  and ph.po_header_id = pl.po_header_id
  and rs.po_line_id = rsl.po_line_id
  and rs.po_header_id = rsl.po_header_id
  and rs.to_organization_id = rsl.to_organization_id
  and rsl.shipment_header_id = rsh.shipment_header_id
  and rsh.ship_to_org_id = rsl.to_organization_id
group by
  msi.segment1,
  msi.description,
  ph.segment1,
  pl.line_num,
  pl.quantity,
  rsh.receipt_num,
  rsh.bill_of_lading

Oracle EBS-SQL (INV-7):检查接收中记录数.sql的更多相关文章

  1. Oracle查询库中记录数大于2千万的所有表

    Oracle查询库中记录数大于2千万的所有表 假如当前用户拥有select any table权限,则可以使用下列sql语句: select table_name, num_rows from dba ...

  2. oracle数据库误删的表以及表中记录的恢复

    oracle数据库误删的表以及表中记录的恢复 一.表的恢复 对误删的表,只要没有使用PURGE永久删除选项,那么从flash back区恢复回来希望是挺大的.一般步骤有: --1.从flash bac ...

  3. SQL查询一个表的总记录数的方法

    一.简单查询语句 1. 查看表结构 SQL>DESC emp; 2. 查询所有列 SQL>SELECT * FROM emp; 3. 查询指定列 SQL>SELECT empmo, ...

  4. Oracle实现分页,每页有多少条记录数

    分页一直都是关系数据库的热门,在数据量非常多的情况下,需要根据分页展示,每页展示多少条记录,以此减轻数据的压力; 1实现原理,根据rownum取记录数,根据公式(页数-1)*每页想要展示的记录数 AN ...

  5. Oracle EBS-SQL (PO-3):检查期间手工下达的采购订单记录数.sql

    SELECT DECODE(pda.req_distribution_id,'','手工','自动创建') 下达方式, --pda.req_distribution_id                ...

  6. Oracle EBS-SQL (PO-2):检查当月到货补单的记录数.sql

    SELECT          DECODE(PLLA.FROM_LINE_ID,'-1','手工','','自动创建') 下达方式,          rsh.receipt_num         ...

  7. Oracle EBS-SQL (PO-12):检查期间请购单的下达记录数.sql

    SELECT DECODE(PRHA.INTERFACE_SOURCE_CODE,'','手工','MRP','自动') 下达方式, PRHA.CREATION_DATE                ...

  8. Oracle EBS-SQL (INV-5):检查期间拉式物料领用记录数.sql

    select         FU.description                                  操作者,         KK.DESCRIPTION           ...

  9. Oracle EBS-SQL (WIP-11):检查期间任务完工记录数.sql

    select        WE.WIP_ENTITY_NAME                 任务名称,        WDJ.class_code                         ...

随机推荐

  1. python保留指定文件、删除目录其他文件的功能(2)

    在(1)中脚本实现了保留指定文件的功能,但不能删除空目录,在此补上删除空目录的方法 def DeleteEmptyDir(path): for i in range(1,100): for paren ...

  2. 纯js实现积木(div)拖动效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. position属性absolute与relative(转)

    每次要用到Position属性时,总要去搜索下,这两个属性值的区别:今天就直接复制网上的结果,以便以后多看看. Absolute,CSS中的写法是:position:absolute; 他的意思是绝对 ...

  4. RedHat下MySQL 5.6 安装、维护

    准备环境: RedHat 5系统.MySQL 5.6 rpm包 首先 上传mysql至服务器 1. 解压缩MySql [root@localhost]# tar -xvf MySQL-5.6.2_m5 ...

  5. leiningen安装记录

    Leiningen是Clojure项目管理工具Leiningen is the easiest way to use Clojure,官网:http://leiningen.org/ 1:首先下载Le ...

  6. Service、Alarm与BroadcastReceiver的使用方法

    1:定义一个服务类,在服务类中使用AlarmManager 来管理服务的运行 public class WtacService extends Service{ private AlarmManage ...

  7. HtmlNodeType枚举

    HtmlNodeType是一个枚举,用于说明一个节点的类型. 源代码如下所示: public enum HtmlNodeType { Document = 0, Element = 1, Commen ...

  8. Ajax 缓存问题

    Ajax通过GET方式请求服务器数据,Microsoft Internet Explorer浏览器下,由于缓存问题,读取的数据非最新数据,解决问题方法如下: function getData(url, ...

  9. SQL Server 中使用参数化Top语句

    在T-Sql中,一般top数据不确定的情况下,都是拼sql,这样无论是效率还是可读性都不好.应该使用下面参数化Top方式:declare @TopCount int set @TopCount = 1 ...

  10. Linux FTP安装与简单配置

    1.检測是否原有启动 ps -ef|grep vsftpd 2.检測是否有安装包 rpm -qa|grep vsftpd 3.假设有输出.查看状态并启动 service vsftp status  - ...