SF_PURG2_PID_VW

(SQL View)
Index Back

Prdn IDs Purge PA Select View

03/18/03 PWF MG Archive Record

SELECT DISTINCT business_unit , prdn_area_code FROM PS_SF_PRDNID_HEADR WHERE ma_prdn_id_flg = 'Y' AND PROD_STATUS IN ('70','90') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_EARNCONCOSTB A WHERE A.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND A.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND A.POSTED_FLAG='N') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_EARNCONCOST B WHERE B.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND B.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND B.POSTED_FLAG='N') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_SCRAPCOSTB C WHERE C.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND C.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND C.POSTED_FLAG='N') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_SCRAPCOST D WHERE D.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND D.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND D.POSTED_FLAG='N') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_VARIANCES E WHERE E.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND E.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND E.POSTED_FLAG='N') AND NOT EXISTS ( SELECT 'X' FROM PS_SF_VARIANCESB F WHERE F.PRODUCTION_ID = PS_SF_PRDNID_HEADR.PRODUCTION_ID AND F.BUSINESS_UNIT = PS_SF_PRDNID_HEADR.BUSINESS_UNIT AND F.POSTED_FLAG='N')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Prompt Table: BUS_UNIT_TBL_MG

2 PRDN_AREA_CODE Character(10) VARCHAR2(10) NOT NULL Production Area