2199: where dup_set_id in
2200: (select dup_set_id
2201: from HZ_MERGE_BATCH mb,
2202: HZ_DUP_SETS ds,
2203: Fnd_Concurrent_Requests r,
2204: FND_CONCURRENT_PROGRAMS cp
2205: where
2206: mb.batch_id = ds.dup_set_id
2207: and R.Program_Application_ID = 222
2212: and r.phase_code = 'C'
2213: and ds.status ='SUBMITTED');
2214:
2215:
2216: /* handle the case that requests have been deleted from the Fnd_Concurrent_Requests*/
2217:
2218: update hz_dup_sets
2219: set status = 'ERROR'
2220: where dup_set_id in
2220: where dup_set_id in
2221: (select dup_set_id
2222: from HZ_MERGE_BATCH mb,
2223: HZ_DUP_SETS ds,
2224: Fnd_Concurrent_Requests r
2225: where
2226: mb.batch_id = ds.dup_set_id
2227: and r.request_id(+) = mb.request_id
2228: and ds.status ='SUBMITTED'