185: into l_out_code
186: from jtf_ih_outcomes_vl
187: where outcome_id=p_outcome;
188: else
189: l_out_code:=iex_utilities.get_lookup_meaning('IEX_ALL_TYPE','ALL');
190: end if;
191:
192: if p_result is not null then
193: l_where:=l_where||' and jii.result_id='||p_result;
195: into l_resl_code
196: from jtf_ih_results_vl
197: where result_id=p_result;
198: else
199: l_resl_code:=iex_utilities.get_lookup_meaning('IEX_ALL_TYPE','ALL');
200: end if;
201:
202: if p_reason is not null then
203: l_where:=l_where||' and jii.reason_id='||p_reason;
205: into l_res_code
206: from jtf_ih_reasons_vl
207: where reason_id=p_reason;
208: else
209: l_res_code:=iex_utilities.get_lookup_meaning('IEX_ALL_TYPE','ALL');
210: end if;
211:
212: /* l_where:=l_where||' and (ipd.campaign_sched_id in (Select source_code_id '||
213: 'from ams_source_codes '||
270: into l_collector
271: from jtf_rs_resource_extns
272: where resource_id=p_collector;
273: else
274: l_collector:=iex_utilities.get_lookup_meaning('IEX_ALL_TYPE','ALL');
275: end if;
276:
277: if p_campaign is not null then
278: select source_code
279: into l_campaign
280: from ams_source_codes
281: where source_code_id=p_campaign;
282: else
283: l_campaign:=iex_utilities.get_lookup_meaning('IEX_ALL_TYPE','ALL');
284: end if;
285:
286: select TRUNC(sysdate)
287: into l_sysdate
303: l_xml_header := l_xml_header ||l_new_line||'
304: l_xml_header := l_xml_header ||l_new_line||'
305: l_xml_header := l_xml_header ||l_new_line||'
306: l_xml_header := l_xml_header ||l_new_line||'
307: l_xml_header := l_xml_header ||l_new_line||'
308: l_xml_header := l_xml_header ||l_new_line||'
309: l_xml_header := l_xml_header ||l_new_line||'
310: l_xml_header := l_xml_header ||l_new_line||'
311: -- IF l_rows_processed=0 THEN