The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE insert_row (x_rowid IN OUT NOCOPY VARCHAR2,
x_source_comb_id NUMBER,
x_source_comb_code VARCHAR2,
x_source_comb_desc VARCHAR2,
x_source_id NUMBER,
x_start_date DATE,
x_end_date DATE,
x_code_combination_id NUMBER,
x_scope_lookup_code VARCHAR2,
x_method_lookup_code VARCHAR2,
x_rate_override_type VARCHAR2,
x_supplier_id NUMBER,
x_supplier_site_id NUMBER,
x_supplier_type VARCHAR2,
x_item_id NUMBER,
x_item_type VARCHAR2,
x_method_justification VARCHAR2,
x_ghg_organization_id NUMBER,
x_location_code VARCHAR2,
x_transport_type_lookup_code VARCHAR2,
x_created_by NUMBER,
x_creation_date DATE,
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_org_id NUMBER ) IS
v_debug_info VARCHAR2(100);
SELECT ROWID
FROM GHG_SOURCE_COMBINATIONS
WHERE source_combination_id = x_source_comb_id;
v_debug_info := 'Inserting into GHG_SOURCE_COMBINATIONS';
INSERT INTO GHG_SOURCE_COMBINATIONS (source_combination_id,
source_combination_code,
source_combination_description,
source_id,
start_date,
end_date,
code_combination_id,
scope_lookup_code,
method_lookup_code,
rate_override_type,
supplier_id,
supplier_site_id,
supplier_type,
item_id,
item_type,
method_justification,
ghg_organization_id,
location_code,
transport_type_lookup_code,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
org_id)
VALUES (x_source_comb_id,
x_source_comb_code,
x_source_comb_desc,
x_source_id ,
x_start_date ,
x_end_date ,
x_code_combination_id,
x_scope_lookup_code ,
x_method_lookup_code,
x_rate_override_type,
x_supplier_id ,
x_supplier_site_id ,
x_supplier_type ,
x_item_id ,
x_item_type ,
x_method_justification,
x_ghg_organization_id ,
x_location_code ,
x_transport_type_lookup_code,
x_created_by ,
x_creation_date ,
x_last_updated_by ,
x_last_update_date ,
x_last_update_login ,
x_org_id );
END insert_row;
PROCEDURE update_row (x_rowid IN OUT NOCOPY VARCHAR2,
x_source_comb_id NUMBER,
x_source_comb_code VARCHAR2,
x_source_comb_desc VARCHAR2,
x_source_id NUMBER,
x_start_date DATE,
x_end_date DATE,
x_code_combination_id NUMBER,
x_scope_lookup_code VARCHAR2,
x_method_lookup_code VARCHAR2,
x_rate_override_type VARCHAR2,
x_supplier_id NUMBER,
x_supplier_site_id NUMBER,
x_supplier_type VARCHAR2,
x_item_id NUMBER,
x_item_type VARCHAR2,
x_method_justification VARCHAR2,
x_ghg_organization_id NUMBER,
x_location_code VARCHAR2,
x_transport_type_lookup_code VARCHAR2,
x_created_by NUMBER,
x_creation_date DATE,
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_org_id NUMBER ) IS
v_debug_info VARCHAR2(100);
UPDATE GHG_SOURCE_COMBINATIONS
SET source_combination_id = x_source_comb_id,
source_combination_code = x_source_comb_code,
source_combination_description = x_source_comb_desc,
source_id = x_source_id,
start_date = x_start_date,
end_date = x_end_date,
code_combination_id = x_code_combination_id,
scope_lookup_code = x_scope_lookup_code,
method_lookup_code = x_method_lookup_code,
rate_override_type = x_rate_override_type,
supplier_id = x_supplier_id,
supplier_site_id = x_supplier_site_id,
supplier_type = x_supplier_type,
item_id = x_item_id,
item_type = x_item_type,
method_justification = x_method_justification,
ghg_organization_id = x_ghg_organization_id,
location_code = x_location_code,
transport_type_lookup_code = x_transport_type_lookup_code,
created_by = x_created_by,
creation_date = x_creation_date,
last_updated_by = x_last_updated_by,
last_update_date = x_last_update_date,
last_update_login = x_last_update_login,
org_id = x_org_id
WHERE rowid = x_rowid;
END update_row;
PROCEDURE delete_row (x_source_comb_id NUMBER) IS
v_debug_info VARCHAR2(100);
DELETE FROM GHG_SOURCE_COMBINATIONS
WHERE source_combination_id = x_source_comb_id;
END delete_row;
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_org_id NUMBER ) IS
v_debug_info VARCHAR2(100);
SELECT source_combination_id,
source_combination_code,
source_combination_description,
source_id,
start_date,
end_date,
code_combination_id,
scope_lookup_code,
method_lookup_code,
rate_override_type,
supplier_id,
supplier_site_id,
supplier_type,
item_id,
item_type,
method_justification,
ghg_organization_id,
location_code,
transport_type_lookup_code,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
org_id
FROM GHG_SOURCE_COMBINATIONS
WHERE rowid = x_rowid
FOR UPDATE of source_id NOWAIT;
AND ((recinfo.last_updated_by = x_last_updated_by) OR
(recinfo.last_updated_by IS NULL AND x_last_updated_by IS NULL))
AND ((recinfo.last_update_date = x_last_update_date) OR
(recinfo.last_update_date IS NULL AND x_last_update_date IS NULL))
AND ((recinfo.org_id = x_org_id) OR
(recinfo.org_id IS NULL AND x_org_id IS NULL)))
THEN
NULL;
SELECT count(*)
into v_row_count
FROM GHG_SOURCE_COMBINATIONS_ALL
where source_combination_id = x_source_comb_id;
select GHG_SOURCE_COMBINATIONS_S.NEXTVAL
into v_source_comb_id
from dual;