The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT b.profile_option_value
FROM fnd_profile_options a, fnd_profile_option_values b
WHERE a.profile_option_id = b.profile_option_id
AND a.profile_option_name = 'AS_SM_CREATE_TASKS'
AND b.application_id =279;
SELECT decode(category,'EMPLOYEE','RS_EMPLOYEE','PARTNER','RS_PARTNER','PARTY','RS_PARTY')
FROM jtf_rs_resource_extns
WHERE resource_id = p_owner_id ;
SELECT b.autocreatetask_flag,b.sales_methodology_id
FROM as_leads_all a,as_sales_methodology_b b
WHERE a.lead_id = p_source_object_id
AND a.sales_methodology_id = b.sales_methodology_id;
SELECT a.sales_stage_id,task_template_group_id
FROM as_sales_meth_stage_map a
WHERE a.sales_methodology_id= l_methodology_id
ORDER BY stage_sequence;
SELECT count(a.task_id) FROM as_sales_meth_task_map a
WHERE a.object_type_code = p_source_object_type_code
AND a.object_id = p_source_object_id
AND a.sales_stage_id = l_sales_stage_id
AND a.sales_methodology_id = l_methodology_id;
SELECT TO_CHAR(AS_SALES_METHODOLOGY_WF_S.NEXTVAL) INTO itemkey FROM dual;
CURSOR c_current_stage IS SELECT a.task_id FROM jtf_tasks_b a,as_sales_meth_task_map b,
jtf_task_statuses_b c
WHERE a.task_id = b.task_id
AND a.source_object_type_code = l_source_object_type_code
AND a.source_object_id = l_source_object_id
AND b.sales_stage_id = l_object_id
AND a.task_status_id = c.task_status_id
AND a.restrict_closure_flag ='Y'
AND (c.closed_flag IS NULL OR c.closed_flag <> 'Y');
CURSOR c_next_stage IS SELECT a.task_id FROM as_sales_meth_task_map a
WHERE a.object_type_code = l_source_object_type_code
AND a.object_id = l_source_object_id
AND a.sales_stage_id = l_object_id ;
SELECT sales_methodology_id from as_leads_all a
WHERE a.lead_id = l_source_object_id;
SELECT template_id,template_group_id
FROM JTF_TASKS_B where task_id = l_taask_id;
select customer_id, address_id
from as_leads_all
where lead_id = c_lead_id;
select party_site_id
from hz_party_sites
where party_id = c_customer_id
and identifying_address_flag = 'Y';
select task_template_id
from jtf_task_templates_b
where task_group_id = c_task_template_group_id;
select contact_point_id
from hz_contact_points
where owner_table_name = 'HZ_PARTIES'
and owner_table_id = c_customer_id
and status = 'A'
and primary_flag = 'Y'
-- and contact_point_type in ('EMAIL', 'PHONE');
l_task_template_group_info.date_selected := 'P';
l_update_status VARCHAR2(100);
SELECT duration,duration_uom,object_version_number,task_id,description,planned_start_date
FROM jtf_tasks_vl
WHERE task_id = l_current_task_id;
--------------------Update api------------------------------------
JTF_TASKS_PUB.update_task (
p_api_version => 1.0,
p_object_version_number => c_tasks_rec.object_version_number,
p_task_id => c_tasks_rec.task_id,
p_description => c_tasks_rec.description,
p_planned_start_date => l_planned_start_date,
p_planned_end_date => l_planned_end_date,
x_return_status => l_update_status,
x_msg_count => l_msg_count ,
x_msg_data => l_msg_data );
print_message('status after update task api='||l_update_status);
IF l_update_status = 'S' AND l_notes_flag ='NO'THEN
l_return_status:='S';
ELSIF l_update_status = 'S' AND l_notes_flag ='YES' THEN
l_return_status := 'U';
g_notes:=fnd_message.get_string('AS','AS_DURATION_UPDATE_FAIL');
p_last_update_date => sysdate,
p_last_updated_by => fnd_global.user_id,
p_creation_date => sysdate,
p_created_by => fnd_global.user_id,
p_last_update_login => fnd_global.login_id,
p_context => NULL,
p_note_type => 'AS_SYSTEM',
p_jtf_note_contexts_tab => l_context_tab );
l_sql:='SELECT task_name FROM jtf_tasks_vl WHERE task_id IN'||'('||l_long_task_id||')';
p_last_update_date => sysdate,
p_last_updated_by => fnd_global.user_id,
p_creation_date => sysdate,
p_created_by => fnd_global.user_id,
p_last_update_login => fnd_global.login_id,
p_context => NULL,
p_note_type => 'AS_SYSTEM',
p_jtf_note_contexts_tab => l_context_tab );
p_last_update_date => sysdate,
p_last_updated_by => fnd_global.user_id,
p_creation_date => sysdate,
p_created_by => fnd_global.user_id,
p_last_update_login => fnd_global.login_id,
p_context => NULL,
p_note_type => 'AS_SYSTEM',
p_jtf_note_contexts_tab => l_context_tab );