HRQ_ALL_QSTN_RESPONSES_V

Details

  • Schema: FUSION

  • Object owner: HRQ

  • Object type: VIEW

Columns

Columns that are associated with the view.
Name
QSTNR_RESPONSE_ID
QSTNR_QUESTION_ID
BUSINESS_GROUP_ID
QSTN_RESPONSE_ID
ANSWER_TYPE
ANSWER_TEXT
ANSWER_ID

Query

Query details for the view
SQL_Statement

SELECT QSTNR_RESPONSE_ID,

QSTNR_QUESTION_ID,

BUSINESS_GROUP_ID,

QSTN_RESPONSE_ID,

nvl2(ANSWER_ID || ANSWER_TEXT, nvl2(ANSWER_ID, 'RATING','ANSWER'), NULL) AS ANSWER_TYPE,

ANSWER_TEXT,

ANSWER_ID from

(SELECT BUSINESS_GROUP_ID,

QSTNR_RESPONSE_ID,

QSTN_RESPONSE_ID,

QSTNR_QUESTION_ID,

ANSWER_TEXT,

regexp_substr (answer_list, '[^,;]+', 1, rn) ANSWER_ID

FROM

(

SELECT BUSINESS_GROUP_ID,

QSTNR_RESPONSE_ID,

QSTN_RESPONSE_ID,

QSTNR_QUESTION_ID,

ANSWER_TEXT,

ANSWER_LIST

FROM HRQ_QSTN_RESPONSES

),

(SELECT rownum rn

FROM

(SELECT MAX (LENGTH (regexp_replace (answer_list, '[^,]+'))) + 1 max_value

FROM

(SELECT answer_list FROM HRQ_QSTN_RESPONSES

)

)

CONNECT BY level <= max_value

)

WHERE regexp_substr (NVL(answer_list,'dummy'), '[^,]+', 1, rn) IS NOT NULL

)