采购,接收数据收集SQL汇总(从订单->接收->INVOICE所有数据关联SQL)
1: po_headers_all - SQL
select ph.*
from po_headers_all ph
where segment1 = '15100005'
and ph.org_id = 85 order by ph.org_id
2: po_lines_all - SQL
select pl.*
from po_lines_all pl ,
po_headers_all ph
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pl.po_header_id = ph.po_header_id
and ph.org_id = 85 order by pl.po_header_id , pl.po_line_id
3: po_line_locations_all - SQL
select pl.line_num , pl.item_id , msi.segment1 "Item Number (segment1) " , pll.*
from po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
mtl_system_items msi
where pl.po_header_id = ph.po_header_id
and pll.po_line_id = pl.po_line_id
and msi.organization_id = pll.ship_to_organization_id
and msi.inventory_item_id = pl.item_id
and ph.segment1 = '15100005'
and ph.org_id = 85
union all
select pl.line_num , pl.item_id , null , pll.*
from po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph
where pl.po_header_id = ph.po_header_id
and pll.po_line_id = pl.po_line_id
and pl.item_id is null
and ph.segment1 = '15100005'
and ph.org_id = 85
4: po_distributions_all - SQL
select pd.*
from po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
po_distributions_all pd
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and pll.line_location_id = pd.line_location_id
and ph.org_id = 85 order by pd.po_header_id , pd.po_line_id , pd.line_location_id , pd.po_distribution_id
5: Account Code Combinations - OU
/* Accounts for Op. Unit Id 85 = XY_瑗垮煙浜氱敵 */ select distinct 85 OU_id , gcc.CODE_COMBINATION_ID , gcc.segment1||'.'|| gcc.segment2||'.'|| gcc.segment3||'.'|| gcc.segment4||'.'|| gcc.segment5||'.'|| gcc.segment6||'.'|| gcc.segment7||'.'|| gcc.segment8 " Account Combination " , gcc.CHART_OF_ACCOUNTS_ID , gcc.ACCOUNT_TYPE , gcc.ENABLED_FLAG , gcc.SUMMARY_FLAG , gcc.DESCRIPTION , gcc.START_DATE_ACTIVE , gcc.END_DATE_ACTIVE , gcc.segment1 "PZ_COMPANY" , gcc.segment2 "PZ_DEPARTMENT" , gcc.segment3 "PZ_ACCOUNT" , gcc.segment4 "PZ_SUBACCOUNT" , gcc.segment5 "PZ_PRODUCT" , gcc.segment6 "PZ_PROJECT" , gcc.segment7 "PZ_PARTY" , gcc.segment8 "PZ_SPARE"
from gl_code_combinations gcc ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
po_distributions_all pd
where gcc.summary_flag = 'N'
and template_id is null
and chart_of_accounts_id = 101
and pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and pll.line_location_id = pd.line_location_id
and gcc.code_combination_id in (pd.accrual_account_id , pd.budget_account_id , pd.VARIANCE_ACCOUNT_ID , pd.code_combination_id)
6: rcv_receiving_sub_ledger - SQL
select rrsl.*
from rcv_receiving_sub_ledger rrsl ,
rcv_transactions rt ,
po_headers_all ph
where rt.po_header_id = ph.po_header_id
and rrsl.rcv_transaction_id = rt.transaction_id
and ph.segment1 = '15100005'
and ph.org_id = 85
7: ap_invoice_distributions_all - SQL
select id.*
from ap_invoice_distributions_all id ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
po_distributions_all pd
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and pll.line_location_id = pd.line_location_id
and id.po_distribution_id = pd.po_distribution_id
and ph.org_id = 85
8: ap_invoices_all - SQL
select ai.*
from ap_invoices_all ai ,
ap_invoice_distributions_all id ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
po_distributions_all pd
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and pll.line_location_id = pd.line_location_id
and id.po_distribution_id = pd.po_distribution_id
and ai.invoice_id = id.invoice_id
and ph.org_id = 85
9: ap_invoice_lines_interface - SQL
select ili.*
from ap_invoice_lines_interface ili ,
po_headers_all ph
where ph.segment1 = '15100005'
and (ili.po_header_id = ph.po_header_id
or ili.po_number = '15100005' )
and ph.org_id = 85
10: ap_invoices_interface - SQL
select ihi.*
from ap_invoices_interface ihi ,
ap_invoice_lines_interface ili ,
po_headers_all ph
where ph.segment1 = '15100005'
and (ili.po_header_id = ph.po_header_id
or ili.po_number = '15100005' )
and ihi.invoice_id = ili.invoice_id
and ph.org_id = 85
11: rcv_shipment_headers - SQL
select distinct rsh.*
from po_headers_all ph ,
rcv_shipment_lines rsl ,
rcv_shipment_headers rsh
where ph.segment1 = '15100005'
and rsl.po_header_id = ph.po_header_id
and rsl.shipment_header_id = rsh.shipment_header_id
and ph.org_id = 85 order by rsh.shipment_header_id
12: rcv_shipment_lines - SQL
select rsl.*
from po_headers_all ph ,
rcv_shipment_lines rsl
where ph.segment1 = '15100005'
and rsl.po_header_id = ph.po_header_id
and ph.org_id = 85 order by rsl.po_header_id , rsl.po_release_id , rsl.po_line_id , rsl.po_line_location_id , rsl.po_distribution_id
13: rcv_transactions - SQL
select rt.*
from rcv_transactions rt ,
po_headers_all ph
where rt.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and ph.org_id = 85 order by rt.po_header_id , rt.po_release_id , rt.po_line_id , rt.po_line_location_id , rt.po_distribution_id , rt.transaction_id
14: mtl_supply - SQL
select ms.*
from mtl_supply ms ,
po_headers_all ph
where ms.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and ph.org_id = 85 order by ms.po_header_id , ms.po_release_id , ms.po_line_id , ms.po_line_location_id , ms.po_distribution_id
15: rcv_supply - SQL
select rs.*
from rcv_supply rs ,
po_headers_all ph
where rs.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and ph.org_id = 85 order by rs.po_header_id , rs.po_release_id , rs.po_line_id , rs.po_line_location_id , rs.po_distribution_id
16: rcv_headers_interface - SQL
select rhi.*
from rcv_headers_interface rhi
where exists (
select 1
from po_headers_all ph ,
rcv_shipment_lines rsl ,
rcv_shipment_headers rsh
where ph.segment1 = '15100005'
and ph.org_id = 85
and rsl.po_header_id = ph.po_header_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rsh.shipment_header_id = rhi.receipt_header_id)
or exists (
select 2
from rcv_transactions_interface rti
where nvl (rti.document_num , '-99999') = '15100005'
and rhi.header_interface_id = rti.header_interface_id)
or exists (
select 3
from rcv_transactions_interface rti ,
po_headers_all poh
where rti.po_header_id = poh.po_header_id
and rti.po_header_id is not null
and poh.segment1 = '15100005'
and rhi.header_interface_id = rti.header_interface_id)
17: rcv_transactions_interface - SQL
select distinct rti.*
from rcv_transactions_interface rti
where nvl(rti.document_num , '-99999') = '15100005'
or exists (
select 1
from po_headers_all ph
where ph.segment1 = '15100005'
and ph.org_id = 85
and rti.po_header_id = ph.po_header_id )
18: po_interface_errors - SQL
select distinct pie.*
from po_interface_errors pie ,
rcv_transactions_interface rti ,
rcv_headers_interface rhi ,
po_headers_all poh
where ((table_name = 'RCV_HEADERS_INTERFACE'
and rti.header_interface_id = rhi.header_interface_id
and pie.interface_header_id = rhi.header_interface_id
and (nvl (rti.po_header_id , -999) = poh.po_header_id
or nvl (rti.document_num , '-9999') = poh.segment1 ) )
or (table_name = 'RCV_TRANSACTIONS_INTERFACE'
and pie.interface_line_id = rti.interface_transaction_id
and (nvl (rti.po_header_id , -999) = poh.po_header_id
or nvl (rti.document_num , '-9999') = poh.segment1 ) ) )
and poh.segment1 = '15100005'
19: mtl_system_items - SQL
select distinct msi.*
from mtl_system_items msi ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and msi.inventory_item_id = pl.item_id
and msi.organization_id = pll.ship_to_organization_id
and ph.org_id = 85
20: mtl_material_transactions - SQL
select mmt.*
from mtl_material_transactions mmt ,
po_headers_all ph
where mmt.transaction_source_id = ph.po_header_id
and mmt.transaction_source_type_id = 1
and ph.segment1 = '15100005'
and ph.org_id = 85
21: mtl_transaction_types - SQL
select mtt.transaction_type_id , mtt.transaction_type_name , mtt.transaction_source_type_id , mtt.transaction_action_id , mtt.user_defined_flag , mtt.disable_date
from mtl_transaction_types mtt
where exists (
select 1
from mtl_material_transactions mmt ,
po_headers_all ph
where mmt.transaction_source_id = ph.po_header_id
and mmt.transaction_source_type_id = 1
and ph.segment1 = '15100005'
and mtt.transaction_type_id = mmt.transaction_type_id
and ph.org_id = 85 )
or exists (
select 2
from mtl_material_transactions_temp mmtt ,
po_headers_all ph
where mmtt.transaction_source_id = ph.po_header_id
and ph.segment1 = '15100005'
and mmtt.transaction_type_id = mtt.transaction_type_id
and ph.org_id = 85 )
22: mtl_txn_request_lines - SQL
select distinct mol.*
from mtl_txn_request_lines mol ,
rcv_transactions rt ,
rcv_shipment_lines rsl ,
po_headers_all ph
where mol.reference_id = decode(mol.reference , 'SHIPMENT_LINE_ID' , rt.shipment_line_id , 'PO_LINE_LOCATION_ID' , rt.po_line_location_id , 'ORDER_LINE_ID' , rt.oe_order_line_id)
and rt.shipment_line_id = rsl.shipment_line_id
and mol.organization_id = rt.organization_id
and mol.inventory_item_id = rsl.item_id
and ph.segment1 = '15100005'
and rsl.po_header_id = ph.po_header_id
and ph.org_id = 85
23: mtl_material_transactions_temp - SQL
select mmtt.*
from mtl_material_transactions_temp mmtt ,
po_headers_all ph
where mmtt.transaction_source_id = ph.po_header_id
and ph.segment1 = '15100005'
and ph.org_id = 85
24: org_organization_definitions - SQL
select distinct ood.*
from org_organization_definitions ood ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
financials_system_params_all fsp
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and fsp.org_id = ph.org_id
and ood.organization_id in (fsp.inventory_organization_id , pll.ship_to_organization_id)
and ph.org_id = 85
25: mtl_parameters - SQL
select distinct mp.*
from mtl_parameters mp ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
financials_system_params_all fsp
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and fsp.org_id = ph.org_id
and mp.organization_id in (fsp.inventory_organization_id , pll.ship_to_organization_id)
and ph.org_id = 85
26: rcv_parameters - SQL
select distinct rp.*
from rcv_parameters rp ,
po_line_locations_all pll ,
po_lines_all pl ,
po_headers_all ph ,
financials_system_params_all fsp
where pl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and pll.po_line_id = pl.po_line_id
and fsp.org_id = ph.org_id
and (rp.organization_id = fsp.inventory_organization_id
or rp.organization_id = pll.ship_to_organization_id)
and ph.org_id = 85
27: po_system_parameters_all - SQL
select psp.*
from po_system_parameters_all psp ,
po_headers_all ph
where psp.org_id = ph.org_id
and ph.segment1 = '15100005'
and ph.org_id = 85
28: financials_system_params_all - SQL
select fsp.*
from financials_system_params_all fsp ,
po_headers_all ph
where fsp.org_id = ph.org_id
and ph.segment1 = '15100005'
and ph.org_id = 85
29: Serial Control - SQL
select lookup_type , lookup_code , meaning , enabled_flag , start_date_active , end_date_active
from mfg_lookups
where lookup_type = 'MTL_SERIAL_NUMBER'
30: mtl_lot_numbers - SQL
select mln.*
from mtl_lot_numbers mln ,
mtl_transaction_lot_numbers mtln ,
po_headers_all ph ,
mtl_material_transactions mmt
where mmt.transaction_source_id = ph.po_header_id
and mmt.transaction_source_type_id = 1
and ph.segment1 = '15100005'
and mtln.transaction_id = mmt.transaction_id
and mtln.lot_number = mln.lot_number
and mtln.inventory_item_id = mln.inventory_item_id
and mtln.organization_id = mln.organization_id
and ph.org_id = 85
31: mtl_transaction_lot_numbers - SQL
select mtln.*
from mtl_transaction_lot_numbers mtln ,
po_headers_all ph ,
mtl_material_transactions mmt
where mmt.transaction_source_id = ph.po_header_id
and mmt.transaction_source_type_id = 1
and ph.segment1 = '15100005'
and mtln.transaction_id = mmt.transaction_id
and ph.org_id = 85
32: mtl_transaction_lots_interface - SQL
select mtli.*
from mtl_transaction_lots_interface mtli ,
rcv_transactions_interface rti
where (nvl(rti.document_num , '-99999') = '15100005'
or exists (
select 1
from po_headers_all ph
where ph.segment1 = '15100005'
and ph.org_id = 85
and rti.po_header_id = ph.po_header_id ) )
and mtli.product_transaction_id = RTI.interface_transaction_id
33: mtl_transaction_lots_temp - SQL
select mtlt.*
from mtl_transaction_lots_temp mtlt ,
mtl_material_transactions_temp mmtt ,
po_headers_all ph
where mmtt.transaction_source_id = ph.po_header_id
and ph.segment1 = '15100005'
and mmtt.transaction_source_type_id = 1
and mmtt.transaction_temp_id = mtlt.transaction_temp_id
and ph.org_id = 85
34: rcv_lots_supply - SQL
select rls.*
from rcv_lots_supply rls ,
rcv_shipment_lines rsl ,
po_headers_all ph
where rsl.shipment_line_id = rls.shipment_line_id
and ph.segment1 = '15100005'
and rsl.po_header_id = ph.po_header_id
and ph.org_id = 85
35: rcv_lot_transactions - SQL
select rlt.*
from rcv_lot_transactions rlt ,
rcv_shipment_lines rsl ,
po_headers_all ph
where rsl.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and rsl.shipment_line_id = rlt.shipment_line_id
and ph.org_id = 85
36: rcv_lots_interface - SQL
select rli.*
from rcv_lots_interface rli ,
rcv_transactions_interface rti
where rti.interface_transaction_id = rli.interface_transaction_id
and (exists (
select 1
from po_headers_all ph
where rti.po_header_id = ph.po_header_id
and ph.segment1 = '15100005'
and ph.org_id = 85 )
or (nvl(rti.document_num , '-99999') = '15100005' ) )
37: Lot Control - SQL
select lookup_code , meaning , enabled_flag , start_date_active , end_date_active
from mfg_lookups
where lookup_type = 'MTL_LOT_CONTROL'
38: Lot Generation - SQL
select lookup_code , meaning , enabled_flag , start_date_active , end_date_active
from mfg_lookups
where lookup_type = 'MTL_LOT_GENERATION'
39: Lot Uniqueness - SQL
select lookup_code , meaning , enabled_flag , start_date_active , end_date_active
from mfg_lookups
where lookup_type = 'MTL_LOT_UNIQUENESS'
采购,接收数据收集SQL汇总(从订单->接收->INVOICE所有数据关联SQL)的更多相关文章
- 销售订单-修改量-高级定价关联sql
修改量消耗明细 --修改量消耗明细 SELECT t.name, t.comments, t.version_no, cux_rebate_pub.get_hou_name(p_organizatio ...
- SQL Server自动化运维系列——关于数据收集(多服务器数据收集和性能监控)
需求描述 在生产环境中,很多情况下需要采集数据,用以定位问题或者形成基线. 关于SQL Server中的数据采集有着很多种的解决思路,可以采用Trace.Profile.SQLdiag.扩展事件等诸多 ...
- SQL Server自动化运维系列 - 多服务器数据收集和性能监控
需求描述 在生产环境中,很多情况下需要采集数据,用以定位问题或者形成基线. 关于SQL Server中的数据采集有着很多种的解决思路,可以采用Trace.Profile.SQLdiag.扩展事件等诸多 ...
- SQL Server 自动化运维系列 - 多服务器数据收集和性能监控
需求描述 在生产环境中,很多情况下需要采集数据,用以定位问题或者形成基线. 关于SQL Server中的数据采集有着很多种的解决思路,可以采用Trace.Profile.SQLdiag.扩展事件等诸多 ...
- 【转】sql server数据收集和监控
转自:https://www.cnblogs.com/zhijianliutang/p/4476403.html 相关系列: https://www.cnblogs.com/zhijianliutan ...
- 创建数据收集器集(DSC)
TechNet 库 Windows Server Windows Server 2008 R2 und Windows Server 2008 按类别提供的 Windows Server 内容 按类别 ...
- SQL Server游标 C# DataTable.Select() 筛选数据 什么是SQL游标? SQL Server数据类型转换方法 LinQ是什么? SQL Server 分页方法汇总
SQL Server游标 转载自:http://www.cnblogs.com/knowledgesea/p/3699851.html. 什么是游标 结果集,结果集就是select查询之后返回的所 ...
- Telegraf和Grafana监控多平台上的SQL Server-自定义监控数据收集
问题 在上一篇文章中,我们使用Telegraf自带的Plugin配置好了的监控,但是自带的Plugin并不能完全覆盖我们想要的监控指标,就需要收集额外的自定义的监控数据,实现的方法有: 开发自己的Te ...
- 将 Azure SQL 内数据下载到本地,满足企业的「数据收集」
嫌长不看版 本文介绍了通过复制和导出两个操作,将 Azure SQL 数据库中的内容转移至其他位置(例如本地环境)的具体做法.借此可以帮助用户在 Azure 中运行数据库的同时,在本地或指定的其他位置 ...
- 以后要进行数据收集,打开邮箱就行了 | formtalk入驻Office 应用商店
『数据收集』,作为一项工作,存在感高的忽视不了——不管你在企业里是什么角色(大部分),Ta似乎都在你的工作范围内. 你是人事:收集招聘数据.员工信息: 你是采购:收集供应商信息.商品数据: 你是市场: ...
随机推荐
- CoreAnimation动画结构变量
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 免责申明:本博客提供的所有翻译文章原稿均来自互联网,仅供学习交 ...
- [lua]luasocket.c:20:17: fatal error: lua.h: No such file or directory
安装luasocket的时候出现了如下的错误 问题 $ tar xzf luasocket-2.0.2.tar.gz $ cd luasocket-2.0.2 $ $ make cd src; mak ...
- activty栈管理
题外话:我们有时在开发中,通常会有如下的需求:屏幕1-->屏幕2-->屏幕3-->屏幕4...,现在需要直接从屏幕4-->屏幕1,很多人会想到对activity进行管理得到对应 ...
- Java基本语法-----java运算符的优先级与结合性
这是本人以前的上学期间java 运算符这块知识的总结的,截图存到了word里,大家将就看下吧(不会用Markdown的表格 不然就在写一遍了 T T). [正在看本人博客的这位童鞋,我看你气度不凡,谈 ...
- UNIX网络编程——揭开网络编程常见API的面纱【上】
Linux网络编程API函数初步剖析 今天我们来分析一下前几篇博文中提到的网络编程中几个核心的API,探究一下当我们调用每个API时,内核中具体做了哪些准备和初始化工作. 1.socket(famil ...
- 怎样在Ubuntu 14.04中搭建gitolite git服务器
1. 首先这里我们安装openssh-serveropenssh-client,如果你用的是VPS之类的一般都默认安装好了,不过运行一个这个命令不会有错的,如果有安装就会提示已安装. sud ...
- Android初级教程进程间的通信AIDL
在介绍跨程序进程间通信AIDL前,先看一下本程序activity与某个服务是怎么绑定在一起进行交互的. 需求:服务有两个方法.分别是播放音乐与停止播放音乐.该程序的活动要访问这两个方法,在activi ...
- leetcode:程序员面试技巧
起因 写在开头,脑袋铁定秀逗了,历时20多天,刷完了leetcode上面151道题目(当然很多是google的),感觉自己对算法和数据结构算是入门了,但仍然还有很多不清楚的地方,于是有了对于每道题目写 ...
- IBM SPSS 实习总结
2015过完年,我知道导师要出国了,自己也算是水了一个idea 的论文.希望研二能找个实习,早听说西安IBM这边有学长在里面实习过,2月底联系了一下简历就塞了过去.面试就在锦业一路软件园他们上班的地方 ...
- 如何在Cocos2D游戏中实现A*寻路算法(四)
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请告诉我,如果觉得不错请多多支持点赞.谢谢! hopy ;) 免责申明:本博客提供的所有翻译文章原稿均来自互联网,仅供学习交流 ...