DBA Data[Home] [Help]

VIEW: APPS.HRI_CL_GEO_COUNTRY_V

Source

View Text - Preformatted

SELECT DECODE(lkp.lookup_code, null, trt.territory_code, lkp.lookup_code || '+' || trt.territory_code) id , trt.territory_short_name value , hr_general.start_of_time start_date , hr_general.end_of_time end_date , trt.territory_short_name ORDER_BY , trt.territory_code country_code , trt.eu_code eu_code , trt.iso_numeric_code iso_numeric_code FROM fnd_territories_vl trt , fnd_lookups lkp , bis_territory_hierarchies bth WHERE trt.territory_code = bth.CHILD_TERRITORY_CODE(+) and lkp.lookup_code(+) = bth.PARENT_TERRITORY_CODE AND lkp.lookup_type (+) = 'AREA' AND bth.child_territory_type (+) = 'COUNTRY' AND bth.parent_territory_type (+) = 'AREA' UNION ALL SELECT 'NA_EDW' ID , '' value , hr_general.start_of_time start_date , hr_general.end_of_time end_date , ' ' ORDER_BY , 'NA_EDW' country_code , 'NA_EDW' eu_code , 'NA_EDW' iso_numeric_code FROM dual WITH READ ONLY
View Text - HTML Formatted

SELECT DECODE(LKP.LOOKUP_CODE
, NULL
, TRT.TERRITORY_CODE
, LKP.LOOKUP_CODE || '+' || TRT.TERRITORY_CODE) ID
, TRT.TERRITORY_SHORT_NAME VALUE
, HR_GENERAL.START_OF_TIME START_DATE
, HR_GENERAL.END_OF_TIME END_DATE
, TRT.TERRITORY_SHORT_NAME ORDER_BY
, TRT.TERRITORY_CODE COUNTRY_CODE
, TRT.EU_CODE EU_CODE
, TRT.ISO_NUMERIC_CODE ISO_NUMERIC_CODE
FROM FND_TERRITORIES_VL TRT
, FND_LOOKUPS LKP
, BIS_TERRITORY_HIERARCHIES BTH
WHERE TRT.TERRITORY_CODE = BTH.CHILD_TERRITORY_CODE(+)
AND LKP.LOOKUP_CODE(+) = BTH.PARENT_TERRITORY_CODE
AND LKP.LOOKUP_TYPE (+) = 'AREA'
AND BTH.CHILD_TERRITORY_TYPE (+) = 'COUNTRY'
AND BTH.PARENT_TERRITORY_TYPE (+) = 'AREA' UNION ALL SELECT 'NA_EDW' ID
, '' VALUE
, HR_GENERAL.START_OF_TIME START_DATE
, HR_GENERAL.END_OF_TIME END_DATE
, ' ' ORDER_BY
, 'NA_EDW' COUNTRY_CODE
, 'NA_EDW' EU_CODE
, 'NA_EDW' ISO_NUMERIC_CODE
FROM DUAL WITH READ ONLY