The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'Duplicate'
FROM GL_TRANSACTION_CALENDAR gps
WHERE gps.name = x_name
AND ( row_id is null
OR gps.rowid <> row_id);
CURSOR C IS SELECT
transaction_calendar_id,
name,
sun_business_day_flag,
mon_business_day_flag,
tue_business_day_flag,
wed_business_day_flag,
thu_business_day_flag,
fri_business_day_flag,
sat_business_day_flag,
security_flag,
description,
context,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
FROM gl_transaction_calendar
WHERE ROWID = X_Rowid
FOR UPDATE OF transaction_calendar_id NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE insert_row
(X_Rowid IN OUT NOCOPY VARCHAR2,
x_transaction_calendar_id IN OUT NOCOPY NUMBER,
x_name VARCHAR2,
x_sun_business_day_flag VARCHAR2,
x_mon_business_day_flag VARCHAR2,
x_tue_business_day_flag VARCHAR2,
x_wed_business_day_flag VARCHAR2,
x_thu_business_day_flag VARCHAR2,
x_fri_business_day_flag VARCHAR2,
x_sat_business_day_flag VARCHAR2,
x_security_flag VARCHAR2,
x_creation_date DATE,
x_created_by NUMBER,
x_last_update_date DATE,
x_last_updated_by NUMBER,
x_last_update_login NUMBER,
x_description VARCHAR2,
x_context VARCHAR2,
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
) IS
CURSOR C_ROWID IS SELECT rowid FROM gl_transaction_calendar
WHERE transaction_calendar_id = x_transaction_calendar_id;
INSERT INTO gl_transaction_calendar
(
transaction_calendar_id,
name,
sun_business_day_flag,
mon_business_day_flag,
tue_business_day_flag,
wed_business_day_flag,
thu_business_day_flag,
fri_business_day_flag,
sat_business_day_flag,
security_flag,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
description,
context,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
)
VALUES
(
x_transaction_calendar_id,
x_name,
x_sun_business_day_flag,
x_mon_business_day_flag,
x_tue_business_day_flag,
x_wed_business_day_flag,
x_thu_business_day_flag,
x_fri_business_day_flag,
x_sat_business_day_flag,
x_security_flag,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_description,
x_context,
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
);
END insert_row;
PROCEDURE Delete_Row(x_transaction_calendar_id NUMBER) IS
CURSOR check_ledger IS
SELECT '1'
FROM dual
WHERE EXISTS
(SELECT 'Used by ledger'
FROM GL_LEDGERS
WHERE
transaction_calendar_id = x_transaction_calendar_id
);
DELETE FROM GL_TRANSACTION_CALENDAR
WHERE transaction_calendar_id = x_transaction_calendar_id;
DELETE FROM GL_TRANSACTION_DATES
WHERE transaction_calendar_id = x_transaction_calendar_id;
END Delete_Row;
SELECT '1'
FROM dual
WHERE EXISTS
(SELECT 'Used by ledger'
FROM GL_LEDGERS
WHERE
transaction_calendar_id = x_transaction_calendar_id
);