The following lines contain the word 'select', 'insert', 'update' or 'delete':
/* This procedure updates the existing csd_ro_savedsearches table to */
/* support the iSupport multiparty enhancement. The party_id for the */
/* existing records will be updated to default party_id corresponding to*/
/* user_id. */
/* @param. None */
procedure CSD_ISUPPORT_SSEARCH_MIG7 is
-- collection to hold the user_id, party_id
--usr_party_tbl user_party_id_tbl;
select user_id,customer_id
bulk collect into l_user_id_tbl,l_party_id_tbl
from fnd_user
where user_id in ( select distinct user_id from
csd_ro_savedsearches where party_id is null )
and customer_id is not null;
'Before bulk update of CSD_RO_SAVEDSEARCHES table');
update csd_ro_savedsearches set party_id = l_party_id_tbl(i) --usr_party_tbl(i).party_id
where user_id = l_user_id_tbl(i) --usr_party_tbl(i).user_id
and party_id is null;
'After bulk update of CSD_RO_SAVEDSEARCHES table');