FA_CAT_CONTEXT_VALUES_V

Details

  • Schema: FUSION

  • Object owner: FA

  • Object type: VIEW

Columns

Name

CATEGORY_ID

CATEGORY_CONTEXT

Query

SQL_Statement

select category_id,

decode(sg1.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg2.column_name,

null, '',

st.DELIMITER) ||

decode(sg2.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg3.column_name,

null, '',

st.DELIMITER) ||

decode(sg3.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg4.column_name,

null, '',

st.DELIMITER) ||

decode(sg4.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg5.column_name,

null, '',

st.DELIMITER) ||

decode(sg5.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg6.column_name,

null, '',

st.DELIMITER) ||

decode(sg6.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) ||

decode(sg7.column_name,

null, '',

st.DELIMITER) ||

decode(sg7.column_name,

'SEGMENT1', cat.segment1,

'SEGMENT2', cat.segment2,

'SEGMENT3', cat.segment3,

'SEGMENT4', cat.segment4,

'SEGMENT5', cat.segment5,

'SEGMENT6', cat.segment6,

'SEGMENT7', cat.segment7) as category_context

from FND_KF_STRUCTURES_B st,

FND_KF_SEGMENTS_B sg1,

FND_KF_SEGMENTS_B sg2,

FND_KF_SEGMENTS_B sg3,

FND_KF_SEGMENTS_B sg4,

FND_KF_SEGMENTS_B sg5,

FND_KF_SEGMENTS_B sg6,

FND_KF_SEGMENTS_B sg7,

fa_categories_b cat

where sg1.sequence_number(+) = 1

and sg2.sequence_number(+) = 2

and sg3.sequence_number(+) = 3

and sg4.sequence_number(+) = 4

and sg5.sequence_number(+) = 5

and sg6.sequence_number(+) = 6

and sg7.sequence_number(+) = 7

and st.structure_id = sg1.structure_id(+)

and st.structure_id = sg2.structure_id(+)

and st.structure_id = sg3.structure_id(+)

and st.structure_id = sg4.structure_id(+)

and st.structure_id = sg5.structure_id(+)

and st.structure_id = sg6.structure_id(+)

and st.structure_id = sg7.structure_id(+)

and st.application_id = 140

and st.key_flexfield_code = 'CAT#'