Oracle EBS-SQL (INV-7):检查接收中记录数.sql
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的更多相关文章
- Oracle查询库中记录数大于2千万的所有表
Oracle查询库中记录数大于2千万的所有表 假如当前用户拥有select any table权限,则可以使用下列sql语句: select table_name, num_rows from dba ...
- oracle数据库误删的表以及表中记录的恢复
oracle数据库误删的表以及表中记录的恢复 一.表的恢复 对误删的表,只要没有使用PURGE永久删除选项,那么从flash back区恢复回来希望是挺大的.一般步骤有: --1.从flash bac ...
- SQL查询一个表的总记录数的方法
一.简单查询语句 1. 查看表结构 SQL>DESC emp; 2. 查询所有列 SQL>SELECT * FROM emp; 3. 查询指定列 SQL>SELECT empmo, ...
- Oracle实现分页,每页有多少条记录数
分页一直都是关系数据库的热门,在数据量非常多的情况下,需要根据分页展示,每页展示多少条记录,以此减轻数据的压力; 1实现原理,根据rownum取记录数,根据公式(页数-1)*每页想要展示的记录数 AN ...
- Oracle EBS-SQL (PO-3):检查期间手工下达的采购订单记录数.sql
SELECT DECODE(pda.req_distribution_id,'','手工','自动创建') 下达方式, --pda.req_distribution_id ...
- Oracle EBS-SQL (PO-2):检查当月到货补单的记录数.sql
SELECT DECODE(PLLA.FROM_LINE_ID,'-1','手工','','自动创建') 下达方式, rsh.receipt_num ...
- Oracle EBS-SQL (PO-12):检查期间请购单的下达记录数.sql
SELECT DECODE(PRHA.INTERFACE_SOURCE_CODE,'','手工','MRP','自动') 下达方式, PRHA.CREATION_DATE ...
- Oracle EBS-SQL (INV-5):检查期间拉式物料领用记录数.sql
select FU.description 操作者, KK.DESCRIPTION ...
- Oracle EBS-SQL (WIP-11):检查期间任务完工记录数.sql
select WE.WIP_ENTITY_NAME 任务名称, WDJ.class_code ...
随机推荐
- LigerUI 分页 MVC
Javascirpt代码 $("#showData").ligerGrid({ columns: [ { display: '编号', name: 'L_ID', align: ' ...
- c# Parallel并行运算
string str = ""; DataTable dt=new DataTable(); dt.Columns.Add("name", typeof(Sys ...
- Improving the AbiWord's Piece Table
Improving the AbiWord's Piece Table[转] One of the most critical parts of any word processor is the b ...
- android导航设计
http://www.geekpark.net/read/view/199244 Android 应用中十大导航设计错误 http://mobile.51cto.com/design-432944.h ...
- SQL Server - 聚集索引 <第六篇>
聚集索引的叶子页存储的就是表的数据.因此,表行物理上按照聚集索引列排序,因为表数据只能有一种物理顺序,所以一个表只能有一个聚集索引. 当我们创建主键约束时,如果不存在聚集索引并且该索引没有被明确指定为 ...
- python实现词法分析
#请先安装Ply # -*- coding: utf-8 -*- #------------------------------------------------------------------ ...
- POJ 2533 Longest Ordered Subsequence - from lanshui_Yang
题目大意:求一个数列的最长上升子序列(严格上升). 解题思路: 方法一:O(n^2) dp[i]:表示处理到第i个位置,序列的最长上升子序列末尾为i的长度: a[]数组存储原序列 dp[i] = ma ...
- bzoj1649 [Usaco2006 Dec]Cow Roller Coaster
Description The cows are building a roller coaster! They want your help to design as fun a roller co ...
- FZU 1856 The Troop (JAVA高精度)
Problem 1856 The Troop Accept: 72 Submit: 245Time Limit: 1000 mSec Memory Limit : 32768 KB Pro ...
- hdu 4619 Warm up 2 ( 二分图最大匹配 )
题目:Warm up 2 题意:有横竖两种方式放着的多米诺骨牌,相同方向的不可能重叠,但是横放和竖放 的牌可能重叠.移走重叠的牌使剩下的牌最多. 分析:二分图匹配:最大独立集= ...