View of Oracle
来源:互联网 发布:移动网络想玩传奇 编辑:程序博客网 时间:2024/05/04 15:48
create or replace view lxx_lj_out as
select a."PROD_ORDER",a."YZ_QTY",a."WZ_QTY",a."F_QTY",a."G_QTY",a."MTRL_CODE",a."SHAPE",a."DIA",a."SOURCE_ID",a."NEW_ID",b.sale_order,b.sale_item,d.name_cust, c.pick_up_no,c.pk_date,e.shp_date,e.prod_seq_date||e.prod_seq1||e.prod_seq2 work_num
from ( select * from (
select prod_order,sum(decode(loc_code,'L0XX',qty,0)) yz_qty
,sum(decode(loc_code,'L010',qty,0)) wz_qty
,sum(decode(loc_code,'L0ZZ',qty,0)) f_qty
,sum(decode(loc_code,'L009',qty,0)) g_qty
,mtrl_code,shape,dia,id source_id,new_id
from wip104t
where confirm='Y'
group by prod_order,mtrl_code,shape,dia,id,new_id
)
where yz_qty<>0
or wz_qty<>0
or f_qty<>0
or g_qty<>0 ) a,
prp500m b,
customer d,
wip104c c,
prp503t3 e
where a.prod_order=b.sale_order||'_'||b.sale_item
and b.cust_no=d.no_customer
and a.source_id=c.id
and a.source_id=e.bdl_id
select a."PROD_ORDER",a."YZ_QTY",a."WZ_QTY",a."F_QTY",a."G_QTY",a."MTRL_CODE",a."SHAPE",a."DIA",a."SOURCE_ID",a."NEW_ID",b.sale_order,b.sale_item,d.name_cust, c.pick_up_no,c.pk_date,e.shp_date,e.prod_seq_date||e.prod_seq1||e.prod_seq2 work_num
from ( select * from (
select prod_order,sum(decode(loc_code,'L0XX',qty,0)) yz_qty
,sum(decode(loc_code,'L010',qty,0)) wz_qty
,sum(decode(loc_code,'L0ZZ',qty,0)) f_qty
,sum(decode(loc_code,'L009',qty,0)) g_qty
,mtrl_code,shape,dia,id source_id,new_id
from wip104t
where confirm='Y'
group by prod_order,mtrl_code,shape,dia,id,new_id
)
where yz_qty<>0
or wz_qty<>0
or f_qty<>0
or g_qty<>0 ) a,
prp500m b,
customer d,
wip104c c,
prp503t3 e
where a.prod_order=b.sale_order||'_'||b.sale_item
and b.cust_no=d.no_customer
and a.source_id=c.id
and a.source_id=e.bdl_id
- View of Oracle
- oracle view
- oracle view
- Oracle view
- ORACLE VIEW
- ORACLE VIEW
- Oracle View
- Oracle view
- Resource View Of vs2010
- Field of view
- Oracle Databases, a Penetration Tester’s View of Unauthorized Access to Customer Records
- Oracle 12C ORA-01792: maximum number of columns in a table or view is 1000
- use of list view and tree view
- 相机的Angle of View, Field of view && Focal length
- Three view points of OS
- A New View of Statistics
- The Relational View of Data
- 16bit view of VIM
- 一个宏定义值得注意的地方
- Function of Oracle
- 学习是积累的!——学习.积累.(window对象的属性);
- 毕业后一年
- 排序算法总汇
- View of Oracle
- 世界上有两种事情是不能勉强的
- 发呆
- 学好英语,学好数学。
- javascript/HTML实现多个text控件自动/动态计算总数
- 原型模式(Prototype Pattern)
- 现在的我
- Trigger of Oracle
- 解决MySQL The 'InnoDB' feature is disabled 的问题