[Home] [Help]
141:
142:
143: cursor cur_search is
144: select app_id, obj_id, obj_type, count(*) hits
145: from fnd_etrm_search_tmp
146: group by app_id, obj_id, obj_type
147: order by count(*) desc;
148:
149:
148:
149:
150:
151:
152: type va_table_id is table of fnd_etrm_search_tmp.obj_id%type;
153: type va_application_id is table of fnd_etrm_search_tmp.app_id%type;
154: type va_obj_type is table of fnd_etrm_search_tmp.obj_type%type;
155: type va_col_count is table of number(8);
156:
149:
150:
151:
152: type va_table_id is table of fnd_etrm_search_tmp.obj_id%type;
153: type va_application_id is table of fnd_etrm_search_tmp.app_id%type;
154: type va_obj_type is table of fnd_etrm_search_tmp.obj_type%type;
155: type va_col_count is table of number(8);
156:
157:
150:
151:
152: type va_table_id is table of fnd_etrm_search_tmp.obj_id%type;
153: type va_application_id is table of fnd_etrm_search_tmp.app_id%type;
154: type va_obj_type is table of fnd_etrm_search_tmp.obj_type%type;
155: type va_col_count is table of number(8);
156:
157:
158: vl_table_id va_table_id;
173: v_stmt varchar2(32000);
174:
175: begin
176: v_stmt :=
177: 'insert into fnd_etrm_search_tmp (app_id, obj_id, obj_type)
178: select application_id, table_id, ''COL''
179: from fnd_columns c1
180: where catsearch(c1.description, :search, null) > 0';
181:
181:
182: execute immediate v_stmt using c_search;
183:
184: v_stmt :=
185: 'insert into fnd_etrm_search_tmp (app_id, obj_id, obj_type)
186: select application_id, table_id, ''TAB''
187: from fnd_tables c1
188: where catsearch(c1.description, :search, null) > 0';
189:
189:
190: execute immediate v_stmt using c_search;
191:
192: v_stmt :=
193: 'insert into fnd_etrm_search_tmp (app_id, obj_id, obj_type)
194: select application_id, view_id, ''VW''
195: from fnd_views c1
196: where catsearch(c1.description, :search, null) > 0';
197: