DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_ISC_UPDATE

Source


1 PACKAGE BODY irc_isc_update AS
2 /* $Header: iriscupg.pkb 120.0 2005/07/26 15:11 mbocutt noship $*/
3 
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------< update_keywords >----------------------------|
6 -- ----------------------------------------------------------------------------
7 procedure update_keywords(
8    p_process_ctrl   IN            varchar2,
9    p_start_pkid     IN            number,
10    p_end_pkid       IN            number,
11    p_rows_processed    OUT nocopy number)
12 is
13 --
14 -- This cursor loops over the keywords
15 -- entered by users in Work Preferences
16 --
17 cursor csr_keyword is
18   select keywords,search_criteria_id
19   from irc_search_criteria
20   where search_criteria_id between p_start_pkid and p_end_pkid
21         and object_type = 'WPREF'
22         and keywords is not null;
23   l_rows_processed number := 0;
24 --
25 begin
26   for l_data in csr_keyword
27   loop
28       if(irc_query_parser_pkg.isInvalidKeyword(l_data.keywords))
29       then
30         update irc_search_criteria
31         set keywords = ''
32         where search_criteria_id = l_data.search_criteria_id;
33       end if;
34       l_rows_processed := l_rows_processed + 1;
35   end loop;
36   p_rows_processed := l_rows_processed;
37 end update_keywords;
38 --
39 end irc_isc_update;