343: CURSOR C_get_Appl_Set_Id(p_rec_id number, p_start_time date, p_stop_time date) is
344: SELECT a
345: FROM (SELECT application_set_id a
346: ,COUNT(*) cnt
347: FROM hxc_application_set_comps_v
348: WHERE time_recipient_id IN
349: (SELECT DISTINCT attribute1
350: FROM hxc_time_attributes
351: WHERE time_attribute_id IN
400: hb.scope = 'APPLICATION_PERIOD'))) AND
401: attribute_category = 'APPROVAL') AND
402: a NOT IN
403: (SELECT application_set_id a
404: FROM hxc_application_set_comps_v
405: WHERE time_recipient_id NOT IN
406: (SELECT DISTINCT attribute1
407: FROM hxc_time_attributes
408: WHERE time_attribute_id IN