The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
NULL as ENI_MEASURE1,
NULL as ENI_MEASURE2,
NULL as ENI_MEASURE3,
NULL as ENI_MEASURE4,
NULL as ENI_MEASURE20,
NULL as ENI_MEASURE5,
NULL as ENI_MEASURE6,
NULL as ENI_MEASURE7,
NULL as ENI_MEASURE8,
NULL as ENI_MEASURE9,
NULL as ENI_MEASURE10,
NULL as ENI_MEASURE11,
NULL as ENI_MEASURE12,
NULL as ENI_MEASURE13,
NULL as ENI_MEASURE14,
NULL as ENI_ATTRIBUTE2
FROM
DUAL
';
/* Bug : 3221341 : Modified the select clause to calculate the Days Open only for Non-Implementated
and Non-Cancelled Change Orders */
x_custom_sql :=
'
SELECT
change_notice as ENI_MEASURE1,
eco.description as ENI_MEASURE2,
stat.value as ENI_MEASURE3,
'||l_priority_value||' as ENI_MEASURE4,
'||l_reason_value||' as ENI_MEASURE20,
typ.value as ENI_MEASURE5,
eco.creation_date as ENI_MEASURE6,
need_by_date as ENI_MEASURE7,
(case when :END_DATE < eco.implementation_date
then null else eco.implementation_date end )as ENI_MEASURE8,
( case when :END_DATE < eco.implementation_date
then null
else (eco.implementation_date - eco.creation_date +1) end ) as ENI_MEASURE9,
( case when nvl(nvl(cancellation_date,implementation_date),:NVL_DATE) > :END_DATE
then (:END_DATE - eco.creation_date)
else null end ) as ENI_MEASURE10,
nvl(ass.party_name,'' '') as ENI_MEASURE11,
:END_DATE - eco.need_by_date as ENI_MEASURE12,
(case when :END_DATE < eco.cancellation_date
then null else eco.cancellation_date end )as ENI_MEASURE13,
:OA_URL||''&retainAM=N&changeId=''|| TO_CHAR(ECO.CHANGE_ID) AS ENI_MEASURE14 ,
ECO.CHANGE_ID as ENI_ATTRIBUTE2
FROM
eni_dbi_co_num_mv eco,
hz_parties ass,
eni_chg_mgmt_type_v typ,
eni_chg_mgmt_status_v stat
'||l_priority_from||'
'||l_reason_from||'
WHERE
ass.party_id(+) = eco.assignee_id
and eco.change_order_type_id = typ.id
and eco.status_type = stat.id
'|| l_final_where||'
'|| l_reason_where ||'
'|| l_type_where ||'
'|| l_priority_where ||'
'|| l_status_where ||'
'|| l_item_where ||'
'|| l_org_where||'
ORDER BY
'||l_order_by;