所有者和item

select i.pitem_id,r.pitem_revision_id,p2.puid,p2.pobject_type,o.rowning_groupu,o.rowning_useru,u.puser_id,u.puser_name,g.pname
from PITEM i,PITEMREVISION r,PIMANRELATION p1,PWORKSPACEOBJECT p2,PPOM_APPLICATION_OBJECT o,PPOM_USER u,PPOM_GROUP g
where i.puid=r.ritems_tagu and r.puid=p1.rprimary_objectu and p1.rsecondary_objectu=p2.puid and p2.puid=o.puid
and o.rowning_groupu=g.puid and o.rowning_useru=u.puid
and g.pname='汽车电子产品中心' and p2.pobject_type = '产品 Revision Master'


select i.pitem_id,r.pitem_revision_id,u.puser_id,u.puser_name,g.pname
from PITEM i,PITEMREVISION r,PIMANRELATION p1,PWORKSPACEOBJECT p2,PPOM_APPLICATION_OBJECT o,PPOM_USER u,PPOM_GROUP g
where i.puid=r.ritems_tagu and r.puid=p1.rprimary_objectu and p1.rsecondary_objectu=p2.puid and p2.puid=o.puid
and o.rowning_groupu=g.puid and o.rowning_useru=u.puid
and g.pname='汽车电子产品中心' and p2.pobject_type = '产品 Revision Master'


查询最新版本的(带物料描述):另外一个汽车电子的组为 要用min查询出V00版本才能查出item的所有者,可能还有些不一致
---------------------------------------------------------------------------------------------------
产品:
select i.pitem_id,min(r.pitem_revision_id),min(u.puser_id),min(u.puser_name),min(g.pname),min(p.ptb00_sapdesc),min(p.ptb01_sapdesc)
from PITEM i,PITEMREVISION r,PIMANRELATION p1,PWORKSPACEOBJECT p2,PPOM_APPLICATION_OBJECT o,PPOM_USER u,PPOM_GROUP g,
PTB_PRODUCTVERMASTER p,PFORM f
where i.puid=r.ritems_tagu and r.puid=p1.rprimary_objectu and p1.rsecondary_objectu=p2.puid and p2.puid=o.puid 
and o.rowning_groupu=g.puid and o.rowning_useru=u.puid and f.rdata_fileu=p.PUID and p1.rsecondary_objectu=f.puid
and g.pname='汽车电子产品中心' and p2.pobject_type = '产品 Revision Master' and i.pitem_id='41151060A' group by i.pitem_id
-------
硬件:
select i.pitem_id,min(r.pitem_revision_id),min(u.puser_id),min(u.puser_name),min(g.pname),min(p.ptb00_sapdesc),min(p.ptb01_sapdesc)
from PITEM i,PITEMREVISION r,PIMANRELATION p1,PWORKSPACEOBJECT p2,PPOM_APPLICATION_OBJECT o,PPOM_USER u,PPOM_GROUP g,
PTB_HWVERMASTER p,PFORM f
where i.puid=r.ritems_tagu and r.puid=p1.rprimary_objectu and p1.rsecondary_objectu=p2.puid and p2.puid=o.puid 
and o.rowning_groupu=g.puid and o.rowning_useru=u.puid and f.rdata_fileu=p.PUID and p1.rsecondary_objectu=f.puid
and g.pname='汽车电子产品中心' and p2.pobject_type = '硬件 Revision Master' group by i.pitem_id
--------以下只需要将P表改成对应的表即可
软件:PTB_SWVERMASTER
PCB:PTB_PCBVERMASTER
-------
立项:PTB_PROJECTAPPLYVERMASTER
select i.pitem_id,min(r.pitem_revision_id),min(u.puser_id),min(u.puser_name),min(g.pname),min(p.ptb03_projectname),min(p.ptb07_producttype)
from PITEM i,PITEMREVISION r,PIMANRELATION p1,PWORKSPACEOBJECT p2,PPOM_APPLICATION_OBJECT o,PPOM_USER u,PPOM_GROUP g,
PTB_PROJECTAPPLYVERMASTER p,PFORM f
where i.puid=r.ritems_tagu and r.puid=p1.rprimary_objectu and p1.rsecondary_objectu=p2.puid and p2.puid=o.puid 
and o.rowning_groupu=g.puid and o.rowning_useru=u.puid and f.rdata_fileu=p.PUID and p1.rsecondary_objectu=f.puid
and g.pname='汽车电子产品中心' and p2.pobject_type = '立项 Revision Master' group by i.pitem_id


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值