EP_J_JP_SUB_I2

(SQL View)
Index Back

Profile Items: Sub-Item Map

ePerformance Interface view for JPM Profile Items. Used to map the fields in the JPM Profile Items record to the fields used as ePerformance Sub-Items. This is a clone of EP_J_JP_SUB_I modified for better performance. We removed the nested views.

SELECT A.JPM_PROFILE_ID , A.JPM_CAT_TYPE , A.JPM_CAT_ITEM_ID , B.JPM_CAT_TYPE , B.JPM_CAT_ITEM_ID , A.EFFDT , A.EFF_STATUS , %Substring(C.JPM_DESCR90 , 1 , 60) , C.JPM_TEXT1325_1 FROM PS_JPM_JP_ITEMS A , PS_JPM_JP_ITEMS B , PS_JPM_CAT_ITEMS C WHERE A.JPM_ITEM_KEY_ID = B.JPM_PARENT_KEY_ID AND B.JPM_CAT_TYPE = C.JPM_CAT_TYPE AND B.JPM_CAT_ITEM_ID = C.JPM_CAT_ITEM_ID AND C.EFFDT = ( SELECT MAX(EFFDT) FROM PS_JPM_CAT_ITEMS JPM_CAT_ITEMS WHERE JPM_CAT_ITEMS.JPM_CAT_TYPE =B.JPM_CAT_TYPE AND JPM_CAT_ITEMS.JPM_CAT_ITEM_ID=B.JPM_CAT_ITEM_ID AND JPM_CAT_ITEMS.EFFDT <=B.EFFDT ) AND C.JPM_DESCR90 <> ' ' AND (A.JPM_CAT_ITEM_QUAL = ( SELECT MAX(Q.JPM_CAT_ITEM_QUAL) FROM PS_JPM_JP_ITEMS A1 , PS_JPM_JP_QUAL_INS Q WHERE A1.JPM_PROFILE_ID = A.JPM_PROFILE_ID AND A1.JPM_CAT_TYPE = A.JPM_CAT_TYPE AND A1.JPM_CAT_ITEM_ID = A.JPM_CAT_ITEM_ID AND Q.JPM_CAT_TYPE = A.JPM_CAT_TYPE AND Q.JPM_JP_QUAL_SET = A.JPM_JP_QUAL_SET AND Q.JPM_CAT_ITEM_QUAL = A1.JPM_CAT_ITEM_QUAL AND Q.SEQNO = ( SELECT MIN(Q2.SEQNO) FROM PS_JPM_JP_ITEMS A2 , PS_JPM_JP_QUAL_INS Q2 WHERE A2.JPM_PROFILE_ID = A.JPM_PROFILE_ID AND A2.JPM_CAT_TYPE = A.JPM_CAT_TYPE AND A2.JPM_CAT_ITEM_ID = A.JPM_CAT_ITEM_ID AND Q2.JPM_CAT_TYPE = A.JPM_CAT_TYPE AND Q2.JPM_JP_QUAL_SET = A.JPM_JP_QUAL_SET AND Q2.JPM_CAT_ITEM_QUAL = A2.JPM_CAT_ITEM_QUAL ) ) OR A.JPM_CAT_ITEM_QUAL = ' ') AND (B.JPM_CAT_ITEM_QUAL = ( SELECT MAX(Q.JPM_CAT_ITEM_QUAL) FROM PS_JPM_JP_ITEMS A1 , PS_JPM_JP_QUAL_INS Q WHERE A1.JPM_PROFILE_ID = B.JPM_PROFILE_ID AND A1.JPM_CAT_TYPE = B.JPM_CAT_TYPE AND A1.JPM_CAT_ITEM_ID = B.JPM_CAT_ITEM_ID AND Q.JPM_CAT_TYPE = B.JPM_CAT_TYPE AND Q.JPM_JP_QUAL_SET = B.JPM_JP_QUAL_SET AND Q.JPM_CAT_ITEM_QUAL = A1.JPM_CAT_ITEM_QUAL AND Q.SEQNO = ( SELECT MIN(Q2.SEQNO) FROM PS_JPM_JP_ITEMS A2 , PS_JPM_JP_QUAL_INS Q2 WHERE A2.JPM_PROFILE_ID = B.JPM_PROFILE_ID AND A2.JPM_CAT_TYPE = B.JPM_CAT_TYPE AND A2.JPM_CAT_ITEM_ID = B.JPM_CAT_ITEM_ID AND Q2.JPM_CAT_TYPE = B.JPM_CAT_TYPE AND Q2.JPM_JP_QUAL_SET = B.JPM_JP_QUAL_SET AND Q2.JPM_CAT_ITEM_QUAL = A2.JPM_CAT_ITEM_QUAL ) ) OR B.JPM_CAT_ITEM_QUAL = ' ')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EP_J_PROFILE_ID Character(12) VARCHAR2(12) NOT NULL Profile ID
2 EP_J_ITEM_CAT_TYPE Character(12) VARCHAR2(12) NOT NULL ePerformance specific version of the JPM Catalog Type field.
3 EP_ITEM_ID Character(12) VARCHAR2(12) NOT NULL Item unique identifier
4 EP_J_SUB_CAT_TYPE Character(12) VARCHAR2(12) NOT NULL ePerformance specific version of the JPM Catalog Type field.
5 EP_SUB_ID Character(12) VARCHAR2(12) NOT NULL Sub-Item unique identifier
6 EFFDT Date(10) DATE Effective Date

Default Value: %date

7 EFF_STATUS Character(1) VARCHAR2(1) NOT NULL Effective Status
A=Active
I=Inactive

Default Value: A

8 EP_TITLE Character(60) VARCHAR2(60) NOT NULL Title of an item
9 EP_DESCR254 Long Character CLOB 1325 character description field used in ePerformance