The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'X' FROM pjm_org_parameters
WHERE Organization_ID = L_ID
AND PROJECT_REFERENCE_ENABLED = 'Y';
SELECT 'X' FROM pjm_project_parameters
WHERE Organization_ID = L_ID
AND Project_ID = L_Prj_ID;
SELECT pa_action_id
FROM oke_deliverable_actions
WHERE action_id = p_action_id;
SELECT b.item_id
, b.inventory_org_id
, b.quantity
, b.uom_code
, b.project_id
FROM oke_deliverables_b b
WHERE b.deliverable_id = p_deliverable_id;
SELECT '!'
FROM oke_system_items_v
WHERE id1 = l_item_id
AND organization_id = l_org_id
AND NVL(shippable_item_flag, 'N') = 'Y';
SELECT '!'
FROM oke_deliverable_actions b
WHERE b.Action_ID = p_Action_ID
AND (b.deliverable_id = p_deliverable_id or b.deliverable_id is null and p_deliverable_id is null)
AND (b.Task_ID = p_Task_ID or b.Task_ID is null and p_Task_ID is null)
AND (b.Ship_From_Org_ID = p_Ship_From_Org_ID or b.Ship_From_Org_ID is null and p_Ship_From_Org_ID is null)
AND (b.Ship_From_Location_ID = p_Ship_From_Location_ID or b.Ship_From_Location_ID is null and p_Ship_From_Location_ID is null)
AND (b.Ship_To_Org_ID = p_Ship_To_Org_ID or b.Ship_To_Org_ID is null and p_Ship_To_Org_ID is null)
AND (b.Ship_To_Location_ID = p_Ship_To_Location_ID or b.Ship_To_Location_ID is null and p_Ship_To_Location_ID is null)
AND (b.Expected_Date = p_Expected_Date or b.Expected_Date is null and p_Expected_Date is null)
AND (b.Schedule_Designator = p_Schedule_Designator or b.Schedule_Designator is null and p_Schedule_Designator is null)
AND (b.Quantity = p_Quantity or b.Quantity is null and p_Quantity is null)
AND (b.Uom_Code = p_Uom_Code or b.Uom_Code is null and p_Uom_Code is null)
;
SELECT b.item_id
, b.inventory_org_id
, b.source_deliverable_id
, b.project_id, 'x'
FROM oke_deliverables_b b
WHERE b.deliverable_id = p_deliverable_id
AND b.source_code = 'PA';
SELECT 'x'
FROM oke_system_items_v
WHERE id1 = l_item_id
AND organization_id = l_org_id
AND NVL(shippable_item_flag, 'N') = 'Y';
SELECT b.item_id ,
nvl(b.inventory_org_id,act.ship_to_org_id) org_id ,
b.project_id ,
b.source_deliverable_id, 'x'
FROM oke_deliverables_b b , oke_deliverable_actions act
WHERE b.deliverable_id = P_Deliverable_ID
and b.deliverable_id = act.Deliverable_ID
and act.action_id = p_action_id
AND b.source_code = 'PA' ;
SELECT 'x'
FROM oke_system_items_v
WHERE id1 = l_item_id
AND organization_id = l_org_id
AND NVL(purchasing_enabled_flag, 'N') = 'Y';
select 'OKE_DTS_EXP_PROJECT_INVALID'
from dual
where not exists (
select 'Project is valid'
from pa_projects_expend_v
where project_id = l_project_id )
union all
select 'OKE_PROJECT_NOT_SETUP'
from dual
where not exists (
select 'Project valid for PJM'
from pjm_project_parameters
where organization_id = l_org_id
and project_id = l_project_id )
union all
select 'OKE_DTS_EXP_TASK_INVALID'
from dual
where not exists (
select 'Task valid and chargeable'
from pa_tasks_expend_v t
where project_id = l_project_id
and task_id = l_task_id
and chargeable_flag = 'Y' )
union all
select 'OKE_TASK_REQUIRED'
from dual
where not exists (
select 'Task Reference OK'
from pjm_org_parameters
where organization_id = l_org_id
and not ( project_control_level = 2
and l_task_id is null )
);
select 'OKE_DTS_EXP_PROJECT_INVALID'
from dual
where not exists (
select 'Project is valid'
from pa_projects_expend_v
where project_id = l_project_id )
union all
select 'OKE_DTS_EXP_TASK_INVALID'
from dual
where not exists (
select 'Task is valid and chargeable'
from pa_tasks_expend_v
where project_id = l_project_id
and task_id = l_task_id
and chargeable_flag = 'Y' )
union all
select 'OKE_DTS_EXP_DATE_INVALID'
from dual
where not exists (
select 'Date is valid for task'
from pa_tasks t
, pa_projects_all p
where t.project_id = l_project_id
and t.task_id = l_task_id
and p.project_id = t.project_id
and p_expenditure_item_date
between nvl(t.start_date , nvl(p.start_date , p_expenditure_item_date - 1))
and nvl(t.completion_date , nvl(p.completion_date , p_expenditure_item_date + 1)) )
union all
select 'OKE_DTS_EXP_TYPE_INVALID'
from dual
where not exists (
select 'Expenditure Type exists and is valid'
from pa_expenditure_types_expend_v
where expenditure_type = p_expenditure_type_code
and system_linkage_function = 'VI' )
union all
select 'OKE_DTS_EXP_ORG_INVALID'
from dual
where not exists (
select 'Expenditure Org exists and is valid'
from pa_organizations_expend_v
where organization_id = p_expenditure_organization_id );
SELECT 'x'
FROM gl_sets_of_books gl, org_organization_definitions org
WHERE org.organization_id = P_ID
AND gl.Set_Of_Books_ID = org.Set_Of_Books_ID
AND gl.currency_code = p_currency_code;
SELECT gl.Currency_Code
FROM gl_sets_of_books gl, org_organization_definitions org
WHERE org.ORGANIZATION_ID = P_Org_ID
AND gl.Set_Of_Books_ID = org.Set_Of_Books_ID;
SELECT nvl(description,'')
FROM hr_locations_all
WHERE location_id=p_id;
SELECT substr(address1,1,240)
FROM hz_locations
WHERE location_id=p_id;
SELECT description
FROM hr_locations
WHERE location_id=p_id;