The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT lookup_code, meaning FROM fnd_lookup_values_vl WHERE lookup_type = 'BIS_PMV_APPROVAL_TYPES';
SELECT n.message_type, count(distinct n.notification_id)
FROM wf_notifications n, wf_notification_attributes a
where n.notification_id = a.notification_id
AND ( (n.more_info_role is null)
AND (n.recipient_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME)))
and n.status='OPEN' and n.message_type in (SELECT lookup_code FROM fnd_lookup_values WHERE lookup_type = 'BIS_PMV_APPROVAL_TYPES')
group by n.message_type;
SELECT n.message_type, count(distinct n.notification_id)
FROM wf_notifications n, wf_notification_attributes a
where n.notification_id = a.notification_id AND
(n.more_info_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME))
and n.status='OPEN' and n.message_type in (SELECT lookup_code FROM fnd_lookup_values WHERE lookup_type = 'BIS_PMV_APPROVAL_TYPES')
group by n.message_type;
l_sql := l_sql || ' (SELECT '|| l_mean_types || ' :l_msgtype'||i||' BIS_NOTIFY_PROMPT, ' || l_notif_count(i) ||' BIS_OBJECT_ROW_COUNT, '||
l_exp_url ||' BISREPORTURL '||
' FROM DUAL) ';
l_sql := ' SELECT n.message_type VIEWBY, n.message_type BIS_NOTIFY_PROMPT, 0 BIS_OBJECT_ROW_COUNT, '||'''url'''||' BISREPORTURL '||
' FROM wf_notifications n WHERE 1=2 ';
l_sql := ' SELECT '||l_mean_types||
' n.message_type BIS_NOTIFY_PROMPT, count(distinct n.notification_id) BIS_OBJECT_ROW_COUNT, '|| l_exp_url ||' BISREPORTURL '||
' FROM wf_notifications n, wf_notification_attributes a
where n.notification_id = a.notification_id
and n.status ='||'''OPEN'''||l_type_where||
' and n.recipient_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME) '||
' group by n.message_type ';*/
l_select_clause VARCHAR2(2000);
SELECT lookup_code FROM fnd_lookup_values_vl WHERE lookup_type = 'BIS_PMV_APPROVAL_TYPES';
l_select_clause := ' SELECT distinct FROM_USER BIS_COLUMN_1, n.subject BIS_COLUMN_2,'||
' n.begin_date BIS_COLUMN_3, n.end_date BIS_COLUMN_4,'||
' n.notification_id BIS_COLUMN_5 ,'||
l_drill_url ||' BIS_COLUMN_6 ';
l_recipient_where_clause := ' AND ( (n.more_info_role is null) AND (n.recipient_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME))) ';
l_recipient_where_clause := ' AND ( n.recipient_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME)) ';
l_more_where_clause := ' AND (n.more_info_role in (SELECT role_name from wf_user_roles where user_name=FND_GLOBAL.USER_NAME)) ';
l_sql := '('||l_select_clause || l_from_clause ||l_notif_where_clause||
l_recipient_where_clause ||
l_status_where || l_type_where ||')';
l_sql := l_sql||' UNION ('||l_select_clause || l_from_clause ||l_notif_where_clause||
l_more_where_clause ||
l_status_where || l_type_where ||')';