PLM:与POM_TIMESTAMP表相关联

select * from INFODBA.PPOM_APPLICATION_OBJECT pao
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = pao.puid )

SELECT * FROM INFODBA.PWORKSPACEOBJECT wso
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = wso.puid )

SELECT * FROM INFODBA.PPOM_OBJECT obj
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = obj.puid
and obj.ptimestamp = ts.ptimestamp
) and obj.plsd> ( sysdate- 9/24)
-- and obj.ptimestamp in ('gncxUA3LJw1jNC', 'wCWxUA3LJw1jNC') -- 2019/1/27 16:13:31


SELECT * FROM INFODBA.PIMANRELATION irel
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = irel.RPRIMARY_OBJECTU 
)

SELECT * FROM INFODBA.PIMANRELATION irel
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = irel.RSECONDARY_OBJECTU 
)

SELECT * FROM INFODBA.POM_BACKPOINTER bp
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = bp.to_uid
and TS.PUID in ( 'w5bxUA3LJw1jNC','w5dxUA3LJw1jNC','w5VxUA3LJw1jNC') )
union all
SELECT * FROM INFODBA.POM_BACKPOINTER bp
where exists ( select 1 from INFODBA.POM_TIMESTAMP ts where ts.puid = bp.from_uid
and TS.PUID in ( 'w5bxUA3LJw1jNC','w5dxUA3LJw1jNC','w5VxUA3LJw1jNC') )

 

SELECT * FROM INFODBA.POM_TIMESTAMP
WHERE PTIMESTAMP ='A0fxQwrrJw1jNC'
/**
PUID: 主键ID, 关联 PPOM_OBJECT.PUID
PTIMESTAMP: 关联:PPOM_OBJECT.PTIMESTAMP
PDBTIMESTAMP: 日期时间,北京时间减8小时。
PDELETED: 删除标志,1:表示删除,0:表示当前有效
*/

 

posted @ 2025-04-26 15:37  samrv  阅读(17)  评论(0)    收藏  举报