The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT SUM ( NVL ( QUANTITY , 0 ) )
INTO DB_Res_Qty
FROM SO_LINE_DETAILS
WHERE SCHEDULE_STATUS_CODE = 'RESERVED'
AND LINE_ID = X_Line_Id
AND NVL ( INCLUDED_ITEM_FLAG , 'N' ) = 'N';
SELECT msi.description,
msi.so_transactions_flag,
msi.reservable_type,
msi.atp_flag
INTO P_Item_Desc,
P_SO_Xactions_Flag,
P_Reservable_Type,
P_ATP_Flag
FROM mtl_system_items msi
WHERE msi.inventory_item_id = P_Inventory_Item_Id
AND msi.organization_id = P_Organization_Id;
SELECT min(1)
INTO complexDetails
FROM so_line_details
WHERE line_id = x_line_id
AND NVL( released_flag, 'N') = 'N'
GROUP BY component_code
HAVING COUNT( DISTINCT warehouse_id) > 1
OR COUNT( DISTINCT schedule_date) > 1
OR COUNT( DISTINCT revision) > 1
OR COUNT( DISTINCT lot_number) > 1
OR COUNT( DISTINCT subinventory) > 1
OR COUNT( DISTINCT demand_class_code) > 1
OR ( COUNT( subinventory) > 0
AND COUNT( subinventory) <> COUNT(1))
OR ( COUNT( warehouse_id) > 0
AND COUNT( warehouse_id) <> COUNT(1))
OR ( COUNT( schedule_date) > 0
AND COUNT( schedule_date) <> COUNT(1))
OR ( COUNT( lot_number) > 0
AND COUNT( lot_number) <> COUNT(1))
OR ( COUNT( revision) > 0
AND COUNT( revision) <> COUNT(1))
OR ( COUNT( demand_class_code) > 0
AND COUNT( demand_class_code) <> COUNT(1));
SELECT schedule_date
, demand_class_code
, ship_to_site_use_id
, warehouse_id
, ship_to_contact_id
, shipment_priority_code
, ship_method_code
, schedule_date_svrid
, demand_class_svrid
, ship_to_svrid
, warehouse_svrid
, ship_set_number
, ship_set_number_svrid
INTO P_Db_Schedule_Date
, P_Db_Demand_Class_Code
, P_Db_Ship_To_Site_Use_Id
, P_Db_Warehouse_Id
, P_Db_Ship_To_Contact_Id
, P_Db_Shipment_Priority_Code
, P_Db_Ship_Method_Code
, P_Db_Schedule_Date_Svrid
, P_Db_Demand_Class_Svrid
, P_Db_Ship_To_Svrid
, P_Db_Warehouse_Svrid
, P_Db_Ship_Set_Number
, P_Db_Ship_Set_Number_Svrid
FROM SO_LINES
WHERE rowid = X_Row_Id;
SELECT creation_date
, To_Date(To_Char( creation_date, 'YYYY/MM/DD HH24:MI' ),
'YYYY/MM/DD HH24:MI')
, To_Date(To_Char( standard_component_freeze_date,
'YYYY/MM/DD HH24:MI' ),'YYYY/MM/DD HH24:MI')
, tax_code
, tax_code_svrid
INTO X_Creation_Date
, X_Creation_Date_Time
, X_Std_Component_Freeze_Date
, X_Tax_Code
, X_Tax_Code_Svrid
FROM so_lines
WHERE rowid = X_Row_id;
SELECT 'Y'
INTO X_Configuration_Item_Exists
FROM dual
WHERE exists
(SELECT 'CONFIG_ITEM'
FROM so_line_details
WHERE line_id = X_Line_Id
AND NVl(configuration_item_flag, 'N') = 'Y');
SELECT 'Y'
INTO X_Supply_Res_Details
FROM dual
WHERE exists
(SELECT 'SUPPLY_RESERVED'
FROM so_line_details
WHERE line_id = X_Line_id
AND schedule_status_code = 'SUPPLY RESERVED');