SELECT DISTINCT SRC.JPM_JP_TYPE , TGT.JPM_JP_TYPE FROM PS_JPM_CAT_PROP_VW SRC , PS_JPM_CAT_PROP_VW TGT , PS_JPM_SRCH_CFG CFG WHERE SRC.JPM_CAT_TYPE = TGT.JPM_CAT_TYPE AND SRC.JPM_JP_TYPE = CFG.JPM_SOURCE_JP AND TGT.JPM_JP_TYPE = CFG.JPM_TARGET_JP AND NOT EXISTS ( SELECT 'x' FROM PS_JPM_SRCH_PROPS PROP WHERE TGT.JPM_CAT_TYPE = PROP.JPM_CAT_TYPE AND PROP.OBJECTOWNERID = CFG.OBJECTOWNERID AND PROP.JPM_SRCH_ID = CFG.JPM_SRCH_ID AND PROP.JPM_SRCH_SUB_ID = CFG.JPM_SRCH_SUB_ID AND TGT.FIELDNAME = PROP.JPM_TGT_FIELDNAME) AND (TGT.FIELDNAME IN ( SELECT FIELDNAME FROM PSRECFIELD WHERE RECNAME = 'JPM_SRCH_ITM_SR' ) OR TGT.FIELDNAME = 'JPM_CAT_ITEM_ID' OR TGT.FIELDNAME = 'JPM_CAT_ITEM_QUAL2') UNION SELECT DISTINCT SRC.JPM_JP_TYPE , TGT.JPM_JP_TYPE FROM PS_JPM_CAT_PROP_VW SRC , PS_JPM_CAT_PROP_VW TGT , PS_JPM_SRCH_CFG CFG WHERE SRC.JPM_CAT_TYPE = TGT.JPM_CAT_TYPE AND SRC.JPM_JP_TYPE = CFG.JPM_SOURCE_JP AND TGT.JPM_JP_TYPE = CFG.JPM_TARGET_JP AND NOT EXISTS ( SELECT 'x' FROM PS_JPM_SRCH_PROPS PROP WHERE SRC.JPM_CAT_TYPE = PROP.JPM_CAT_TYPE AND PROP.OBJECTOWNERID = CFG.OBJECTOWNERID AND PROP.JPM_SRCH_ID = CFG.JPM_SRCH_ID AND PROP.JPM_SRCH_SUB_ID = CFG.JPM_SRCH_SUB_ID AND TGT.FIELDNAME = PROP.JPM_TGT_FIELDNAME) AND (TGT.FIELDNAME IN ( SELECT FIELDNAME FROM PSRECFIELD WHERE RECNAME = 'JPM_SRCH_ITM_SR' ) OR TGT.FIELDNAME = 'JPM_CAT_ITEM_ID' OR TGT.FIELDNAME = 'JPM_CAT_ITEM_QUAL2')
|