The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE insert_row (x_rowid IN OUT NOCOPY VARCHAR2,
x_facility_id NUMBER,
x_facility_code VARCHAR2,
x_description VARCHAR2,
x_facility_size_lookup_code VARCHAR2,
x_location_id NUMBER,
x_start_date DATE,
x_end_date DATE,
x_attribute1 VARCHAR2,
x_attribute2 VARCHAR2,
x_attribute3 VARCHAR2,
x_attribute4 VARCHAR2,
x_attribute5 VARCHAR2,
x_attribute6 VARCHAR2,
x_attribute7 VARCHAR2,
x_attribute8 VARCHAR2,
x_attribute9 VARCHAR2,
x_attribute10 VARCHAR2,
x_attribute11 VARCHAR2,
x_attribute12 VARCHAR2,
x_attribute13 VARCHAR2,
x_attribute14 VARCHAR2,
x_attribute15 VARCHAR2,
x_attribute16 VARCHAR2,
x_attribute17 VARCHAR2,
x_attribute18 VARCHAR2,
x_attribute19 VARCHAR2,
x_attribute20 VARCHAR2,
x_attribute_category VARCHAR2,
x_org_id NUMBER,
x_set_of_books_id NUMBER,
x_created_by NUMBER,
x_creation_date DATE,
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_latitude NUMBER,
x_longitude NUMBER,
x_facility_type VARCHAR2,
x_allow_transactions VARCHAR2,
x_ceo_name VARCHAR2,
x_company_number VARCHAR2
) IS
v_debug_info VARCHAR2(100);
SELECT ROWID
FROM GHG_organizations_all
WHERE ghg_organization_id = x_facility_id;
v_debug_info := 'Inserting into GHG_organizations_all';
INSERT INTO GHG_organizations_all (ghg_organization_id,
ghg_organization_code,
description,
organization_size_lookup_code,
location_id,
start_date,
end_date,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
attribute16,
attribute17,
attribute18,
attribute19,
attribute20,
attribute_category,
org_id,
set_of_books_id,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
latitude,
longitude,
organization_type,
allow_transactions,
ceo_name,
company_identifier)
VALUES (x_facility_id,
x_facility_code,
x_description,
x_facility_size_lookup_code,
x_location_id,
x_start_date,
x_end_date,
x_attribute1,
x_attribute2,
x_attribute3,
x_attribute4,
x_attribute5,
x_attribute6,
x_attribute7,
x_attribute8,
x_attribute9,
x_attribute10,
x_attribute11,
x_attribute12,
x_attribute13,
x_attribute14,
x_attribute15,
x_attribute16,
x_attribute17,
x_attribute18,
x_attribute19,
x_attribute20,
x_attribute_category,
x_org_id,
x_set_of_books_id,
x_created_by,
x_creation_date,
x_last_updated_by,
x_last_update_date,
x_last_update_login,
x_latitude,
x_longitude,
x_facility_type,
x_allow_transactions,
x_ceo_name,
x_company_number);
END insert_row;
PROCEDURE update_row (x_rowid IN OUT NOCOPY VARCHAR2,
x_facility_id NUMBER,
x_facility_code VARCHAR2,
x_description VARCHAR2,
x_facility_size_lookup_code VARCHAR2,
x_location_id NUMBER,
x_start_date DATE,
x_end_date DATE,
x_attribute1 VARCHAR2,
x_attribute2 VARCHAR2,
x_attribute3 VARCHAR2,
x_attribute4 VARCHAR2,
x_attribute5 VARCHAR2,
x_attribute6 VARCHAR2,
x_attribute7 VARCHAR2,
x_attribute8 VARCHAR2,
x_attribute9 VARCHAR2,
x_attribute10 VARCHAR2,
x_attribute11 VARCHAR2,
x_attribute12 VARCHAR2,
x_attribute13 VARCHAR2,
x_attribute14 VARCHAR2,
x_attribute15 VARCHAR2,
x_attribute16 VARCHAR2,
x_attribute17 VARCHAR2,
x_attribute18 VARCHAR2,
x_attribute19 VARCHAR2,
x_attribute20 VARCHAR2,
x_attribute_category VARCHAR2,
x_org_id NUMBER,
x_set_of_books_id NUMBER,
x_created_by NUMBER,
x_creation_date DATE,
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_latitude NUMBER,
x_longitude NUMBER,
x_facility_type VARCHAR2,
x_allow_transactions VARCHAR2,
x_ceo_name VARCHAR2,
x_company_number VARCHAR2
) IS
v_debug_info VARCHAR2(100);
UPDATE GHG_organizations_all
SET ghg_organization_id = x_facility_id,
ghg_organization_code = x_facility_code,
description = x_description,
organization_size_lookup_code = x_facility_size_lookup_code,
location_id = x_location_id,
start_date = x_start_date,
end_date = x_end_date,
attribute1 = x_attribute1,
attribute2 = x_attribute2,
attribute3 = x_attribute3,
attribute4 = x_attribute4,
attribute5 = x_attribute5,
attribute6 = x_attribute6,
attribute7 = x_attribute7,
attribute8 = x_attribute8,
attribute9 = x_attribute9,
attribute10 = x_attribute10,
attribute11 = x_attribute11,
attribute12 = x_attribute12,
attribute13 = x_attribute13,
attribute14 = x_attribute14,
attribute15 = x_attribute15,
attribute16 = x_attribute16,
attribute17 = x_attribute17,
attribute18 = x_attribute18,
attribute19 = x_attribute19,
attribute20 = x_attribute20,
attribute_category = x_attribute_category,
org_id = x_org_id,
set_of_books_id = x_set_of_books_id,
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,
latitude = x_latitude,
longitude = x_longitude,
organization_type = x_facility_type ,
allow_transactions = x_allow_transactions,
ceo_name = x_ceo_name,
company_identifier = x_company_number
WHERE rowid = x_rowid;
END update_row;
PROCEDURE delete_row (x_facility_id NUMBER) IS
v_row_count NUMBER(15);
DELETE FROM GHG_organizations_all
WHERE ghg_organization_id = x_facility_id;
END delete_row;
x_last_updated_by NUMBER,
x_last_update_date DATE,
x_last_update_login NUMBER,
x_latitude NUMBER,
x_longitude NUMBER,
x_facility_type VARCHAR2,
x_allow_transactions VARCHAR2,
x_ceo_name VARCHAR2,
x_company_number VARCHAR2
) IS
v_debug_info VARCHAR2(100);
SELECT ghg_organization_id,
ghg_organization_code,
description,
organization_size_lookup_code,
location_id,
start_date,
end_date,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
attribute16,
attribute17,
attribute18,
attribute19,
attribute20,
attribute_category,
org_id,
set_of_books_id,
created_by,
creation_date,
last_updated_by,
last_update_date,
last_update_login,
latitude,
longitude,
organization_type,
allow_transactions,
ceo_name,
company_identifier
FROM GHG_organizations_all
WHERE rowid = x_rowid
FOR UPDATE of ghg_organization_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.latitude = x_latitude) OR (recinfo.latitude IS NULL AND x_latitude IS NULL))
AND ((recinfo.longitude = x_longitude) OR (recinfo.longitude IS NULL AND x_longitude IS NULL))
AND ((recinfo.organization_type = x_facility_type) OR (recinfo.organization_type IS NULL AND x_facility_type IS NULL))
AND ((recinfo.allow_transactions = x_allow_transactions) OR (recinfo.allow_transactions IS NULL AND x_allow_transactions IS NULL))
AND ((recinfo.ceo_name = x_ceo_name) OR (recinfo.ceo_name IS NULL AND x_ceo_name IS NULL))
AND ((recinfo.company_identifier = x_company_number) OR (recinfo.company_identifier IS NULL AND x_company_number IS NULL))
AND ((recinfo.last_update_login = x_last_update_login) OR (recinfo.last_update_login IS NULL AND x_last_update_login IS NULL)) ) THEN
NULL;