SELECT FA.APPLICATION_NAME,
DF.TITLE, FA.APPLICATION_SHORT_NAME, FA.BASEPATH, FA.PRODUCT_CODE, DF.CONCATENATED_SEGS_VIEW_NAME, DF.APPLICATION_TABLE_NAME, DF.DESCRIPTIVE_FLEXFIELD_NAME, DF.LAST_UPDATE_DATE, DF.LAST_UPDATED_BY, DF.CREATION_DATE, DF.CREATED_BY, DF.LAST_UPDATE_LOGIN, DF.CONTEXT_REQUIRED_FLAG, DF.CONTEXT_COLUMN_NAME, DF.CONTEXT_USER_OVERRIDE_FLAG, DF.CONCATENATED_SEGMENT_DELIMITER, DF.FREEZE_FLEX_DEFINITION_FLAG, DF.PROTECTED_FLAG, DF.CONTEXT_SYNCHRONIZATION_FLAG, DF.FORM_CONTEXT_PROMPT, DFC.DESCRIPTIVE_FLEXFIELD_NAME, DFC.DESCRIPTIVE_FLEX_CONTEXT_CODE, DFC.ENABLED_FLAG, DFC.GLOBAL_FLAG, DFC.DESCRIPTION, DFC.DESCRIPTIVE_FLEX_CONTEXT_NAME, DFCU.RUNTIME_PROPERTY_FUNCTION, DFCU.COLUMN_SEQ_NUM, DFCU.APPLICATION_COLUMN_NAME, DFCU.FORM_LEFT_PROMPT, DFCU.FORM_ABOVE_PROMPT, DFCU.END_USER_COLUMN_NAME, DFCU.FLEX_VALUE_SET_ID, FVS.FLEX_VALUE_SET_NAME, (CASE WHEN FVS.VALIDATION_TYPE = 'F' THEN (SELECT ( 'SELECT ' || NVL2 (FVT.ID_COLUMN_NAME, FVT.ID_COLUMN_NAME || ',', '') || NVL2 (FVT.VALUE_COLUMN_NAME, FVT.VALUE_COLUMN_NAME || ',', '') || FVT.MEANING_COLUMN_NAME || ' FROM ' || FVT.APPLICATION_TABLE_NAME || ';') SCRIPTS FROM FND_FLEX_VALIDATION_TABLES FVT, FND_APPLICATION_TL FA WHERE 1 = 1 AND FA.APPLICATION_ID(+) = FVT.TABLE_APPLICATION_ID AND FVT.FLEX_VALUE_SET_ID = FVS.FLEX_VALUE_SET_ID) -- CURSOR ( -- SELECT fa.application_name, -- fvt.application_table_name, -- fvt.summary_allowed_flag, -- fvt.value_column_name, -- fvt.value_column_type, -- fvt.value_column_size, -- fvt.meaning_column_name, -- fvt.meaning_column_type, -- fvt.meaning_column_size, -- fvt.id_column_name, -- fvt.id_column_type, -- fvt.id_column_size, -- --FVT.ADDITIONAL_WHERE_CLAUSE, -- fvt.additional_quickpick_columns, -- ( 'SELECT ' -- || NVL2 (fvt.id_column_name, fvt.id_column_name || ',', '') -- || NVL2 (fvt.value_column_name, fvt.value_column_name || ',', '') -- || fvt.meaning_column_name -- || ' FROM ' -- || fvt.application_table_name -- || ';') -- scripts -- FROM fnd_flex_validation_tables fvt, fnd_application_tl fa -- WHERE 1 = 1 -- AND fa.application_id(+) = fvt.table_application_id -- AND fvt.flex_value_set_id = fvs.flex_value_set_id) WHEN FVS.VALIDATION_TYPE = 'I' THEN ( 'SELECT FVV.FLEX_VALUE_ID, FVV.FLEX_VALUE, FVV.FLEX_VALUE_MEANING, FVV.DESCRIPTION FROM FND_FLEX_VALUES_VL FVV WHERE 1 = 1 AND FVV.ENABLED_FLAG = ''Y'' AND SYSDATE BETWEEN NVL (FVV.START_DATE_ACTIVE, SYSDATE) AND NVL (FVV.END_DATE_ACTIVE, SYSDATE) AND FVV.FLEX_VALUE_SET_ID = ' || FVS.FLEX_VALUE_SET_ID || ';') END) SCRIPTS, CURSOR ( SELECT FLEX_VALUE, FLEX_VALUE_MEANING, DESCRIPTION, ENABLED_FLAG, SUMMARY_FLAG FROM FND_FLEX_VALUES_VL FFV WHERE 1 = 1 AND FFV.ENABLED_FLAG = 'Y' AND SYSDATE BETWEEN NVL (FFV.START_DATE_ACTIVE, SYSDATE) AND NVL (FFV.END_DATE_ACTIVE, SYSDATE) AND FFV.FLEX_VALUE_SET_ID = FVS.FLEX_VALUE_SET_ID) FLEX_VALUES_LIST, DFCU.ENABLED_FLAG, DFCU.REQUIRED_FLAG, DFCU.SECURITY_ENABLED_FLAG, DFCU.DISPLAY_FLAG, DFCU.DISPLAY_SIZE, DFCU.MAXIMUM_DESCRIPTION_LEN, DFCU.CONCATENATION_DESCRIPTION_LEN, DFCU.RANGE_CODE, DFCU.DEFAULT_TYPE, DFCU.DEFAULT_VALUE, FVS.VALIDATION_TYPE FROM FND_APPLICATION_VL FA, FND_DESCRIPTIVE_FLEXS_VL DF, FND_DESCR_FLEX_CONTEXTS_VL DFC, FND_DESCR_FLEX_COL_USAGE_VL DFCU, FND_FLEX_VALUE_SETS FVS WHERE 1 = 1 AND FVS.FLEX_VALUE_SET_ID(+) = DFCU.FLEX_VALUE_SET_ID AND FA.APPLICATION_ID = DF.APPLICATION_ID AND DFCU.ENABLED_FLAG = 'Y' AND DFC.ENABLED_FLAG = 'Y' AND DFCU.APPLICATION_ID = DFC.APPLICATION_ID AND DFCU.DESCRIPTIVE_FLEXFIELD_NAME = DFC.DESCRIPTIVE_FLEXFIELD_NAME AND DFCU.DESCRIPTIVE_FLEX_CONTEXT_CODE = DFC.DESCRIPTIVE_FLEX_CONTEXT_CODE AND DFC.APPLICATION_ID = DF.APPLICATION_ID AND DFC.DESCRIPTIVE_FLEXFIELD_NAME = DF.DESCRIPTIVE_FLEXFIELD_NAME AND DF.TITLE = '离散任务'ORDER BY DFCU.COLUMN_SEQ_NUM;