IN_XRS_IPF_VW(SQL View) |
Index Back |
---|---|
Incorrect Pegged Flags11/08/04 SR/ISC: Created |
SELECT ID.BUSINESS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat ID.ORDER_NO , ID.DEMAND_SOURCE %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.ORDER_INT_LINE_NO) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.SCHED_LINE_NBR) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.DEMAND_LINE_NO) , ID.SUP_PEG_STATUS ,%DatePart(ID.SCHED_ARRV_DTTM) , ID.DESTIN_BU FROM PS_INSTALLATION_IN X , PS_IN_DEMAND ID WHERE ( (ID.SUP_PEG_STATUS = '10' AND NOT EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_IN_DEMAND_HASH IDH2 WHERE IP2.SUPPLY_HASH = IDH2.HASH_KEY AND IP2.SUP_ORDER_TYPE = '035' AND IP2.PEG_STATUS = '10' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.ORDER_NO = ID.ORDER_NO AND IDH2.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH2.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH2.DEMAND_LINE_NO = ID.DEMAND_LINE_NO)) OR (ID.SUP_PEG_STATUS = '40' AND EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_IN_DEMAND_HASH IDH2 WHERE IP2.SUPPLY_HASH = IDH2.HASH_KEY AND IP2.SUP_ORDER_TYPE = '035' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.ORDER_NO = ID.ORDER_NO AND IDH2.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH2.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH2.DEMAND_LINE_NO = ID.DEMAND_LINE_NO)) OR (ID.SUP_PEG_STATUS = '20' AND NOT EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_IN_DEMAND_HASH IDH2 WHERE IP2.SUPPLY_HASH = IDH2.HASH_KEY AND IP2.SUP_ORDER_TYPE = '035' AND IP2.PEG_STATUS = '20' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.ORDER_NO = ID.ORDER_NO AND IDH2.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH2.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH2.DEMAND_LINE_NO = ID.DEMAND_LINE_NO)) OR (ID.SUP_PEG_STATUS = '30' AND ((NOT EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_IN_DEMAND_HASH IDH2 WHERE IP2.SUPPLY_HASH = IDH2.HASH_KEY AND IP2.SUP_ORDER_TYPE = '035' AND IP2.PEG_STATUS = '30' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.ORDER_NO = ID.ORDER_NO AND IDH2.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH2.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH2.DEMAND_LINE_NO = ID.DEMAND_LINE_NO)) OR (EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_IN_DEMAND_HASH IDH2 WHERE IP2.SUPPLY_HASH = IDH2.HASH_KEY AND IP2.SUP_ORDER_TYPE = '035' AND IP2.PEG_STATUS <> '30' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.ORDER_NO = ID.ORDER_NO AND IDH2.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH2.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH2.DEMAND_LINE_NO = ID.DEMAND_LINE_NO))) )) |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | SUP_ORDER_KEY | Character(25) | VARCHAR2(25) NOT NULL | Used to store the various Order Number formats in 1 field |
2 | SUP_LINE_KEY | Character(25) | VARCHAR2(25) NOT NULL | Used to Store the concatenation of Line, Demand, Sched, Kit, etc in 1 field. |
3 | PEG_STATUS | Character(2) | VARCHAR2(2) NOT NULL |
07/21/04 EGS: Created
10=Open 20=Completed 30=Canceled 40=Not Pegged |
4 | SCHED_DATE | Date(10) | DATE | Schedule Date |
5 | BUSINESS_UNIT_IN | Character(5) | VARCHAR2(5) NOT NULL | Inventory Unit |