LM_CATG_ALL_VW

(SQL View)
Index Back

Category All Levels

This view has all the primary categories and their corresponding sub-categories.

SELECT L0.LM_CATG_ID , CASE WHEN L1.LM_CHLD_CATG_ID IS NOT NULL THEN L1.LM_CHLD_CATG_ID END , CASE WHEN L2.LM_CHLD_CATG_ID IS NOT NULL THEN L2.LM_CHLD_CATG_ID END , CASE WHEN L3.LM_CHLD_CATG_ID IS NOT NULL THEN L3.LM_CHLD_CATG_ID END , CASE WHEN L4.LM_CHLD_CATG_ID IS NOT NULL THEN L4.LM_CHLD_CATG_ID END , CASE WHEN L5.LM_CHLD_CATG_ID IS NOT NULL THEN L5.LM_CHLD_CATG_ID END , CASE WHEN L6.LM_CHLD_CATG_ID IS NOT NULL THEN L6.LM_CHLD_CATG_ID END , CASE WHEN L7.LM_CHLD_CATG_ID IS NOT NULL THEN L7.LM_CHLD_CATG_ID END , CASE WHEN L8.LM_CHLD_CATG_ID IS NOT NULL THEN L8.LM_CHLD_CATG_ID END , CASE WHEN L9.LM_CHLD_CATG_ID IS NOT NULL THEN L9.LM_CHLD_CATG_ID END FROM PS_INSTALLATION LEFT OUTER JOIN PS_LM_CATG_TBL L0 ON 1 = 1 LEFT OUTER JOIN PS_LM_CATG_REL_TBL L1 ON L0.LM_CATG_ID = L1.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L2 ON L1.LM_CHLD_CATG_ID = L2.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L3 ON L2.LM_CHLD_CATG_ID = L3.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L4 ON L3.LM_CHLD_CATG_ID = L4.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L5 ON L4.LM_CHLD_CATG_ID = L5.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L6 ON L5.LM_CHLD_CATG_ID = L6.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L7 ON L6.LM_CHLD_CATG_ID = L7.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L8 ON L7.LM_CHLD_CATG_ID = L8.LM_CATG_ID LEFT OUTER JOIN PS_LM_CATG_REL_TBL L9 ON L8.LM_CHLD_CATG_ID = L9.LM_CATG_ID WHERE NOT EXISTS ( SELECT 1 FROM PS_LM_CATG_REL_TBL X WHERE L0.LM_CATG_ID = X.LM_CHLD_CATG_ID)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 LM_CATG_ID Number(10,0) DECIMAL(10) NOT NULL Category ID - System generated number used to uniquely identify a Category.
2 LM_CATG_ID_1 Number(10,0) DECIMAL(10) NOT NULL Category ID
3 LM_CATG_ID_2 Number(10,0) DECIMAL(10) NOT NULL Category ID
4 LM_CATG_ID_3 Number(10,0) DECIMAL(10) NOT NULL Category ID
5 LM_CATG_ID_4 Number(10,0) DECIMAL(10) NOT NULL Category ID
6 LM_CATG_ID_5 Number(10,0) DECIMAL(10) NOT NULL Category ID
7 LM_CATG_ID_6 Number(10,0) DECIMAL(10) NOT NULL Category ID
8 LM_CATG_ID_7 Number(10,0) DECIMAL(10) NOT NULL Category ID
9 LM_CATG_ID_8 Number(10,0) DECIMAL(10) NOT NULL Category ID
10 LM_CATG_ID_9 Number(10,0) DECIMAL(10) NOT NULL Category ID