The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_update_name varchar2(30) := 'IRCRUPCREATENOTIFCP';
SELECT /*+ ROWID(ppf1) */
ppf1.person_id person_id
,ppf1.rowid
,ppf1.party_id party_id
FROM per_all_people_f ppf1
WHERE trunc(sysdate) between ppf1.effective_start_date and ppf1.effective_end_date
AND ppf1.rowid BETWEEN start_rowid and end_rowid
AND person_id = (select min(person_id)
from per_all_assignments_f paaf
where paaf.assignment_type = 'A'
and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
and person_id in (select ppf.person_id
from per_all_people_f ppf
where ppf.party_id = ppf1.party_id
and trunc(sysdate) between ppf.effective_start_date
and ppf.effective_end_date
AND NOT EXISTS ( SELECT /*+ no_unnest */ 1
FROM irc_notification_preferences inp
,per_all_people_f ppf2
WHERE ppf.party_id = ppf2.party_id
AND ppf2.person_id = inp.person_id
AND trunc(sysdate) between ppf2.effective_start_date
and ppf2.effective_end_date
)
)
);
ad_parallel_updates_pkg.initialize_rowid_range(
ad_parallel_updates_pkg.ROWID_RANGE,
l_table_owner,
l_table_name,
l_update_name,
l_worker_id,
l_num_workers,
l_batch_size,
0);
ad_parallel_updates_pkg.get_rowid_range(
l_start_rowid,
l_end_rowid,
l_any_rows_to_process,
l_batch_size,
TRUE);
insert into irc_notification_preferences
( NOTIFICATION_PREFERENCE_ID
,PERSON_ID
,PARTY_ID
,MATCHING_JOBS
,MATCHING_JOB_FREQ
,RECEIVE_INFO_MAIL
,ALLOW_ACCESS
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_LOGIN
,CREATED_BY
,CREATION_DATE
,OBJECT_VERSION_NUMBER)
values
( IRC_NOTIFICATION_PREFS_S.nextval
,l_person_ids(i)
,l_party_ids(i)
,'N'
,'1'
,'N'
,'Y'
,sysdate
,1
,null
,1
,sysdate
,1);
l_person_ids.delete;
l_rowid.delete;
l_party_ids.delete;
ad_parallel_updates_pkg.processed_rowid_range
( l_rows_processed
,l_end_rowid
);
ad_parallel_updates_pkg.get_rowid_range
( l_start_rowid
,l_end_rowid
,l_any_rows_to_process
,l_batch_size
,FALSE
);