12: CURSOR c1 is
13: select hold_source_id
14: from so_hold_sources
15: where hold_entity_id in (select m.duplicate_site_id
16: from ra_customer_merges m
17: where m.process_flag = 'N'
18: and m.request_id = req_id
19: and m.set_number = set_num)
20: and hold_entity_code = 'STS'
23: CURSOR c2 is
24: select hold_source_id
25: from so_hold_sources
26: where hold_entity_id in (select m.duplicate_site_id
27: from ra_customer_merges m
28: where m.process_flag = 'N'
29: and m.request_id = req_id
30: and m.set_number = set_num)
31: and hold_entity_code = 'ITS'
34: CURSOR c3 is
35: select hold_source_id
36: from so_hold_sources
37: where hold_entity_id in (select m.duplicate_site_id
38: from ra_customer_merges m
39: where m.process_flag = 'N'
40: and m.request_id = req_id
41: and m.set_number = set_num)
42: and hold_entity_code = 'S'
45: CURSOR c4 is
46: select hold_source_id
47: from so_hold_sources
48: where hold_entity_id in (select m.duplicate_id
49: from ra_customer_merges m
50: where m.process_flag = 'N'
51: and m.request_id = req_id
52: and m.set_number = set_num)
53: and hold_entity_code = 'C'
87: arp_message.set_token( 'TABLE_NAME', 'SO_HOLD_SOURCES', FALSE );
88:
89: UPDATE SO_HOLD_SOURCES a
90: set (hold_entity_id) = (select distinct m.customer_site_id
91: from ra_customer_merges m
92: where a.hold_entity_id =
93: m.duplicate_site_id
94: and m.request_id = req_id
95: and m.process_flag = 'N'
97: last_update_date = sysdate,
98: last_updated_by = arp_standard.profile.user_id,
99: last_update_login = arp_standard.profile.last_update_login
100: where hold_entity_id in (select m.duplicate_site_id
101: from ra_customer_merges m
102: where m.process_flag = 'N'
103: and m.request_id = req_id
104: and m.set_number = set_num)
105: and hold_entity_code = 'STS';
115: arp_message.set_token( 'TABLE_NAME', 'SO_HOLD_SOURCES', FALSE );
116:
117: UPDATE SO_HOLD_SOURCES a
118: set (hold_entity_id) = (select distinct m.customer_site_id
119: from ra_customer_merges m
120: where a.hold_entity_id =
121: m.duplicate_site_id
122: and m.request_id = req_id
123: and m.process_flag = 'N'
125: last_update_date = sysdate,
126: last_updated_by = arp_standard.profile.user_id,
127: last_update_login = arp_standard.profile.last_update_login
128: where hold_entity_id in (select m.duplicate_site_id
129: from ra_customer_merges m
130: where m.process_flag = 'N'
131: and m.request_id = req_id
132: and m.set_number = set_num)
133: and hold_entity_code = 'ITS';
143: arp_message.set_token( 'TABLE_NAME', 'SO_HOLD_SOURCES', FALSE );
144:
145: UPDATE SO_HOLD_SOURCES a
146: set (hold_entity_id) = (select distinct m.customer_site_id
147: from ra_customer_merges m
148: where a.hold_entity_id =
149: m.duplicate_site_id
150: and m.request_id = req_id
151: and m.process_flag = 'N'
153: last_update_date = sysdate,
154: last_updated_by = arp_standard.profile.user_id,
155: last_update_login = arp_standard.profile.last_update_login
156: where hold_entity_id in (select m.duplicate_site_id
157: from ra_customer_merges m
158: where m.process_flag = 'N'
159: and m.request_id = req_id
160: and m.set_number = set_num)
161: and hold_entity_code = 'S';
171: arp_message.set_token( 'TABLE_NAME', 'SO_HOLD_SOURCES', FALSE );
172:
173: UPDATE SO_HOLD_SOURCES a
174: set hold_entity_id = (select distinct m.customer_id
175: from ra_customer_merges m
176: where a.hold_entity_id =
177: m.duplicate_id
178: and m.process_flag = 'N'
179: and m.request_id = req_id
181: last_update_date = sysdate,
182: last_updated_by = arp_standard.profile.user_id,
183: last_update_login = arp_standard.profile.last_update_login
184: where hold_entity_id in (select m.duplicate_id
185: from ra_customer_merges m
186: where m.process_flag = 'N'
187: and m.request_id = req_id
188: and m.set_number = set_num)
189: and hold_entity_code = 'C';