This query helps to extract value set declaration:
SELECT REPLACE(ffv.flex_value_set_name, '&', ';')"Value Set Name",
REPLACE(ffv.description, '&', ';') "Value Set Description",
val_type.meaning "Validation Type",
(SELECT application_name
FROM apps.fnd_application_tl
WHERE application_id = ffvt.table_application_id AND language = 'US')
"Table Application Name",
ffvt.value_column_name "Display Value",
ffvt.id_column_name "ID Value",
ffvt.application_table_name "Table Name",
xx_get_long_text(ffvt.ROWID) "Additional Information"
FROM apps.fnd_flex_value_sets ffv, apps.fnd_flex_validation_tables ffvt, apps.fnd_lookups val_type
WHERE val_type.lookup_type(+) = 'SEG_VAL_TYPES'
AND val_type.lookup_code(+) = ffv.validation_type
AND ffv.flex_value_set_id = ffvt.flex_value_set_id(+)
AND ffv.flex_value_set_name LIKE 'XX%'
Sample Result:
The function "xx_get_long_text" will convert LONG data type to VARCHAR2:
CREATE OR REPLACE FUNCTION xx_get_long_text(rowid_of_long IN ROWID)
RETURN VARCHAR2
IS
long_to_varchar VARCHAR(32767);
BEGIN
SELECT ffvt.additional_where_clause
INTO long_to_varchar
FROM apps.fnd_flex_validation_tables ffvt
WHERE ROWID = rowid_of_long;
RETURN long_to_varchar;
EXCEPTION
WHEN OTHERS
THEN
RETURN 'Error occurred on rowid: ' || rowid_of_long;
END;
SELECT REPLACE(ffv.flex_value_set_name, '&', ';')"Value Set Name",
REPLACE(ffv.description, '&', ';') "Value Set Description",
val_type.meaning "Validation Type",
(SELECT application_name
FROM apps.fnd_application_tl
WHERE application_id = ffvt.table_application_id AND language = 'US')
"Table Application Name",
ffvt.value_column_name "Display Value",
ffvt.id_column_name "ID Value",
ffvt.application_table_name "Table Name",
xx_get_long_text(ffvt.ROWID) "Additional Information"
FROM apps.fnd_flex_value_sets ffv, apps.fnd_flex_validation_tables ffvt, apps.fnd_lookups val_type
WHERE val_type.lookup_type(+) = 'SEG_VAL_TYPES'
AND val_type.lookup_code(+) = ffv.validation_type
AND ffv.flex_value_set_id = ffvt.flex_value_set_id(+)
AND ffv.flex_value_set_name LIKE 'XX%'
Sample Result:
The function "xx_get_long_text" will convert LONG data type to VARCHAR2:
CREATE OR REPLACE FUNCTION xx_get_long_text(rowid_of_long IN ROWID)
RETURN VARCHAR2
IS
long_to_varchar VARCHAR(32767);
BEGIN
SELECT ffvt.additional_where_clause
INTO long_to_varchar
FROM apps.fnd_flex_validation_tables ffvt
WHERE ROWID = rowid_of_long;
RETURN long_to_varchar;
EXCEPTION
WHEN OTHERS
THEN
RETURN 'Error occurred on rowid: ' || rowid_of_long;
END;
Slingo with Microtouch Solo Titanium - TITanium.com
ReplyDeleteMicrotouch Solo Titanium. All the most popular and trusted raft titanium online titanium trim hair cutter casino games. Enjoy a 2019 ford ecosport titanium smooth setup gold titanium without titanium powder risking your own.