The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE chk_update_mltpl_occrncs_flg(
x_information_type IN per_contact_info_types.information_type%TYPE,
x_multiple_occurences_flag IN per_contact_info_types.multiple_occurences_flag%TYPE) IS
--
CURSOR cel_old_value(
p_information_type IN per_contact_info_types.information_type%TYPE) IS
SELECT multiple_occurences_flag
FROM per_contact_info_types
WHERE information_type = p_information_type;
END chk_update_mltpl_occrncs_flg;
PROCEDURE insert_row(
x_rowid IN OUT NOCOPY VARCHAR2,
x_information_type IN VARCHAR2,
x_active_inactive_flag IN VARCHAR2,
x_multiple_occurences_flag IN VARCHAR2,
x_legislation_code IN VARCHAR2,
x_description IN VARCHAR2,
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER,
x_created_by IN NUMBER,
x_creation_date IN DATE,
x_request_id IN NUMBER,
x_program_application_id IN NUMBER,
x_program_id IN NUMBER,
x_program_update_date IN DATE,
x_object_version_number IN NUMBER) IS
--
CURSOR c IS
SELECT ROWID
FROM per_contact_info_types
WHERE information_type = x_information_type;
INSERT INTO per_contact_info_types(
information_type,
active_inactive_flag,
multiple_occurences_flag,
legislation_code,
-- last_update_date,
-- last_updated_by,
-- last_update_login,
-- created_by,
-- creation_date,
-- request_id,
-- program_application_id,
-- program_id,
-- program_update_date,
object_version_number)
VALUES(
x_information_type,
x_active_inactive_flag,
x_multiple_occurences_flag,
x_legislation_code,
-- x_last_update_date,
-- x_last_updated_by,
-- x_last_update_login,
-- x_created_by,
-- x_creation_date,
-- x_request_id,
-- x_program_application_id,
-- x_program_id,
-- x_program_update_date,
x_object_version_number);
INSERT INTO per_contact_info_types_tl(
information_type,
language,
source_lang,
description,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
SELECT
x_information_type,
l.language_code,
USERENV('LANG'),
x_description,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_created_by,
x_creation_date
FROM fnd_languages l
WHERE l.installed_flag IN ('I','B')
AND NOT EXISTS(
SELECT NULL
FROM per_contact_info_types_tl t
WHERE t.information_type = x_information_type
AND t.language = l.language_code);
END insert_row;
SELECT
active_inactive_flag,
multiple_occurences_flag,
legislation_code,
object_version_number
FROM per_contact_info_types
WHERE information_type = x_information_type
FOR UPDATE OF information_type NOWAIT;
SELECT
description,
DECODE(language,USERENV('LANG'),'Y',
'N') baselang
FROM per_contact_info_types_tl
WHERE information_type = x_information_type
AND USERENV('LANG') IN (language,source_lang)
FOR UPDATE OF information_type NOWAIT;
name => 'FORM_RECORD_DELETED');
PROCEDURE update_row(
x_information_type IN VARCHAR2,
x_active_inactive_flag IN VARCHAR2,
x_multiple_occurences_flag IN VARCHAR2,
x_legislation_code IN VARCHAR2,
x_description IN VARCHAR2,
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER,
x_request_id IN NUMBER,
x_program_application_id IN NUMBER,
x_program_id IN NUMBER,
x_program_update_date IN DATE,
x_object_version_number IN OUT NOCOPY NUMBER) IS
--
CURSOR get_object_version_number IS
SELECT NVL(MAX(object_version_number),0)+1
FROM per_contact_info_types
WHERE information_type = x_information_type;
chk_update_mltpl_occrncs_flg(
x_information_type => x_information_type,
x_multiple_occurences_flag => x_multiple_occurences_flag);
UPDATE per_contact_info_types
SET
active_inactive_flag = x_active_inactive_flag,
multiple_occurences_flag = x_multiple_occurences_flag,
legislation_code = x_legislation_code,
object_version_number = l_ovn
-- last_update_date = x_last_update_date,
-- last_updated_by = x_last_updated_by,
-- last_update_login = x_last_update_login,
-- request_id = x_request_id,
-- program_application_id = x_program_application_id,
-- program_id = x_program_id,
-- program_update_date = x_program_update_date
WHERE information_type = x_information_type;
UPDATE per_contact_info_types_tl
SET
description = x_description,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
source_lang = USERENV('LANG')
WHERE information_type = x_information_type
AND USERENV('LANG') IN (language,source_lang);
END update_row;
PROCEDURE delete_row(
x_information_type IN VARCHAR2) IS
BEGIN
--
DELETE FROM per_contact_extra_info_f
WHERE information_type = x_information_type;
DELETE FROM per_contact_info_types_tl
WHERE information_type = x_information_type;
DELETE FROM per_contact_info_types
WHERE information_type = x_information_type;
END delete_row;
l_program_update_date per_contact_info_types.program_update_date%TYPE;
l_last_update_date per_contact_info_types.last_update_date%TYPE := SYSDATE;
l_last_updated_by per_contact_info_types.last_updated_by%TYPE := 0;
l_last_update_login per_contact_info_types.last_update_login%TYPE := 0;
l_last_updated_by := 1;
update_row(
x_information_type => x_information_type,
x_active_inactive_flag => x_active_inactive_flag,
x_multiple_occurences_flag => x_multiple_occurences_flag,
x_legislation_code => x_legislation_code,
x_description => x_description,
x_last_update_date => l_last_update_date,
x_last_updated_by => l_last_updated_by,
x_last_update_login => l_last_update_login,
x_request_id => l_request_id,
x_program_application_id => l_program_application_id,
x_program_id => l_program_id,
x_program_update_date => l_program_update_date,
x_object_version_number => l_object_version_number);
insert_row(
x_rowid => l_rowid,
x_information_type => x_information_type,
x_active_inactive_flag => x_active_inactive_flag,
x_multiple_occurences_flag => x_multiple_occurences_flag,
x_legislation_code => x_legislation_code,
x_description => x_description,
x_last_update_date => l_last_update_date,
x_last_updated_by => l_last_updated_by,
x_last_update_login => l_last_update_login,
x_created_by => l_created_by,
x_creation_date => l_creation_date,
x_request_id => l_request_id,
x_program_application_id => l_program_application_id,
x_program_id => l_program_id,
x_program_update_date => l_program_update_date,
x_object_version_number => x_object_version_number);
UPDATE per_contact_info_types_tl SET
description = x_description,
last_update_date = SYSDATE,
last_updated_by = DECODE(x_owner,'SEED',1,0),
last_update_login = 0,
source_lang = USERENV('lang')
WHERE userenv('lang') IN (language,source_lang)
AND information_type = x_information_type;
DELETE FROM per_contact_info_types_tl pcitt
WHERE NOT EXISTS(
SELECT NULL FROM per_contact_info_types pcit
WHERE pcit.information_type = pcitt.information_type);
UPDATE per_contact_info_types_tl pcitt_t SET
description = (SELECT pcitt_b.description
FROM per_contact_info_types_tl pcitt_b
WHERE pcitt_b.information_type = pcitt_t.information_type
AND pcitt_b.language = pcitt_t.source_lang)
WHERE (pcitt_t.information_type, pcitt_t.language) IN
(SELECT pcitt_sub_t.information_type, pcitt_sub_t.language
FROM per_contact_info_types_tl pcitt_sub_b, per_contact_info_types_tl pcitt_sub_t
WHERE pcitt_sub_b.information_type = pcitt_sub_t.information_type
AND pcitt_sub_b.language = pcitt_sub_t.source_lang
AND (pcitt_sub_b.description <> pcitt_sub_t.description
OR (pcitt_sub_b.description IS NULL AND pcitt_sub_t.description IS NOT NULL)
OR (pcitt_sub_b.description IS NOT NULL AND pcitt_sub_t.description IS NULL)));
INSERT INTO per_contact_info_types_tl(
information_type,
language,
source_lang,
description,
last_update_date,
last_updated_by,
last_update_login,
created_by,
creation_date)
SELECT
pcitt.information_type,
fl.language_code,
pcitt.source_lang,
pcitt.description,
pcitt.last_update_date,
pcitt.last_updated_by,
pcitt.last_update_login,
pcitt.created_by,
pcitt.creation_date
FROM
per_contact_info_types_tl pcitt,
fnd_languages fl
WHERE fl.installed_flag IN ('I', 'B')
AND pcitt.language = USERENV('LANG')
AND NOT EXISTS(
SELECT NULL FROM per_contact_info_types_tl pcitt_t
WHERE pcitt_t.information_type = pcitt.information_type
AND pcitt_t.language = fl.language_code);
SELECT 1 FROM
per_contact_info_types_tl citt,
per_contact_info_types cit
WHERE UPPER(citt.description) = UPPER(p_description)
AND citt.information_type = cit.information_type
AND citt.language = p_language
AND (cit.information_type <> p_information_type
OR p_information_type IS NULL);