108: l_st_pcnpts_size := GET_TABLE_SIZE('HZ_STAGED_CONTACT_POINTS');
109: l_total_size := l_st_parties_size+l_st_psites_size+l_st_pcnts_size+l_st_pcnpts_size;
110: l_xml_header := l_xml_header ||l_new_line||'
111:
112: select count(party_id) into l_entity_cnt from hz_parties where party_type = 'ORGANIZATION';
113: l_xml_header := l_xml_header ||l_new_line||'
114: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 = 'ORGANIZATION ';
115: l_xml_header := l_xml_header ||l_new_line||'
116: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
113: l_xml_header := l_xml_header ||l_new_line||'
114: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 = 'ORGANIZATION ';
115: l_xml_header := l_xml_header ||l_new_line||'
116: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
117: and party_id in (select party_id from hz_parties where party_type = 'ORGANIZATION' );
118: l_xml_header := l_xml_header ||l_new_line||'
119:
120: select count(party_id) into l_entity_cnt from hz_parties where party_type = 'PERSON';
121: l_xml_header := l_xml_header ||l_new_line||'
116: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
117: and party_id in (select party_id from hz_parties where party_type = 'ORGANIZATION' );
118: l_xml_header := l_xml_header ||l_new_line||'
119:
120: select count(party_id) into l_entity_cnt from hz_parties where party_type = 'PERSON';
121: l_xml_header := l_xml_header ||l_new_line||'
122: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 = 'PERSON ' ;
123: l_xml_header := l_xml_header ||l_new_line||'
124: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
121: l_xml_header := l_xml_header ||l_new_line||'
122: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 = 'PERSON ' ;
123: l_xml_header := l_xml_header ||l_new_line||'
124: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
125: and party_id in (select party_id from hz_parties where party_type = 'PERSON');
126: l_xml_header := l_xml_header ||l_new_line||'
127: l_xml_header := l_xml_header ||l_new_line||'
128: l_xml_header := l_xml_header ||l_new_line||'
129:
124: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
125: and party_id in (select party_id from hz_parties where party_type = 'PERSON');
126: l_xml_header := l_xml_header ||l_new_line||'
127: l_xml_header := l_xml_header ||l_new_line||'
128: l_xml_header := l_xml_header ||l_new_line||'
129:
130: select count(party_id) into l_entity_cnt from hz_parties where party_type in ('ORGANIZATION','PERSON');
131: l_xml_header := l_xml_header ||l_new_line||'
132: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 in ('ORGANIZATION ','PERSON ');
126: l_xml_header := l_xml_header ||l_new_line||'
127: l_xml_header := l_xml_header ||l_new_line||'
128: l_xml_header := l_xml_header ||l_new_line||'
129:
130: select count(party_id) into l_entity_cnt from hz_parties where party_type in ('ORGANIZATION','PERSON');
131: l_xml_header := l_xml_header ||l_new_line||'
132: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 in ('ORGANIZATION ','PERSON ');
133: l_xml_header := l_xml_header ||l_new_line||'
134: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
131: l_xml_header := l_xml_header ||l_new_line||'
132: select count(party_id) into l_staged_cnt from hz_staged_parties where TX36 in ('ORGANIZATION ','PERSON ');
133: l_xml_header := l_xml_header ||l_new_line||'
134: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY'
135: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
136: l_xml_header := l_xml_header ||l_new_line||'
137:
138: select count(party_site_id) into l_entity_cnt from hz_party_sites where party_id in
139: (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
135: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
136: l_xml_header := l_xml_header ||l_new_line||'
137:
138: select count(party_site_id) into l_entity_cnt from hz_party_sites where party_id in
139: (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
140: l_xml_header := l_xml_header ||l_new_line||'
141: select count(party_site_id) into l_staged_cnt from hz_staged_party_sites where org_contact_id IS NULL and party_id in
142: (select party_id from hz_staged_parties where TX36 in ('ORGANIZATION ','PERSON ')) ;
143: l_xml_header := l_xml_header ||l_new_line||'
141: select count(party_site_id) into l_staged_cnt from hz_staged_party_sites where org_contact_id IS NULL and party_id in
142: (select party_id from hz_staged_parties where TX36 in ('ORGANIZATION ','PERSON ')) ;
143: l_xml_header := l_xml_header ||l_new_line||'
144: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='PARTY_SITES'
145: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
146: l_xml_header := l_xml_header ||l_new_line||'
147: l_xml_header := l_xml_header ||l_new_line||'
148: l_xml_header := l_xml_header ||l_new_line||'
149:
147: l_xml_header := l_xml_header ||l_new_line||'
148: l_xml_header := l_xml_header ||l_new_line||'
149:
150: select count(*) into l_entity_cnt from hz_org_contacts where party_relationship_id in
151: (select relationship_id from hz_relationships where subject_table_name='HZ_PARTIES'
152: and object_table_name='HZ_PARTIES' and subject_type in ('ORGANIZATION','PERSON')
153: and object_type in ('ORGANIZATION','PERSON'));
154: l_xml_header := l_xml_header ||l_new_line||'
155:
148: l_xml_header := l_xml_header ||l_new_line||'
149:
150: select count(*) into l_entity_cnt from hz_org_contacts where party_relationship_id in
151: (select relationship_id from hz_relationships where subject_table_name='HZ_PARTIES'
152: and object_table_name='HZ_PARTIES' and subject_type in ('ORGANIZATION','PERSON')
153: and object_type in ('ORGANIZATION','PERSON'));
154: l_xml_header := l_xml_header ||l_new_line||'
155:
156: select count(*) into l_staged_cnt from hz_staged_contacts where org_contact_id in
154: l_xml_header := l_xml_header ||l_new_line||'
155:
156: select count(*) into l_staged_cnt from hz_staged_contacts where org_contact_id in
157: (select org_contact_id from hz_org_contacts where party_relationship_id in
158: (select relationship_id from hz_relationships where subject_table_name='HZ_PARTIES'
159: and object_table_name='HZ_PARTIES' and subject_type in ('ORGANIZATION','PERSON')
160: and object_type in ('ORGANIZATION','PERSON')));
161:
162: l_xml_header := l_xml_header ||l_new_line||'
155:
156: select count(*) into l_staged_cnt from hz_staged_contacts where org_contact_id in
157: (select org_contact_id from hz_org_contacts where party_relationship_id in
158: (select relationship_id from hz_relationships where subject_table_name='HZ_PARTIES'
159: and object_table_name='HZ_PARTIES' and subject_type in ('ORGANIZATION','PERSON')
160: and object_type in ('ORGANIZATION','PERSON')));
161:
162: l_xml_header := l_xml_header ||l_new_line||'
163: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='CONTACTS'
160: and object_type in ('ORGANIZATION','PERSON')));
161:
162: l_xml_header := l_xml_header ||l_new_line||'
163: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='CONTACTS'
164: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
165: l_xml_header := l_xml_header ||l_new_line||'
166: l_xml_header := l_xml_header ||l_new_line||'
167: l_xml_header := l_xml_header ||l_new_line||'
168:
165: l_xml_header := l_xml_header ||l_new_line||'
166: l_xml_header := l_xml_header ||l_new_line||'
167: l_xml_header := l_xml_header ||l_new_line||'
168:
169: select count(contact_point_id) into l_entity_cnt from hz_contact_points where owner_table_name in ('HZ_PARTIES','HZ_PARTY_SITES');
170: l_xml_header := l_xml_header ||l_new_line||'
171:
172: select count(contact_point_id) into l_staged_cnt from hz_staged_contact_points where contact_point_id in
173: (select contact_point_id from hz_contact_points where owner_table_name in ('HZ_PARTIES','HZ_PARTY_SITES'));
169: select count(contact_point_id) into l_entity_cnt from hz_contact_points where owner_table_name in ('HZ_PARTIES','HZ_PARTY_SITES');
170: l_xml_header := l_xml_header ||l_new_line||'
171:
172: select count(contact_point_id) into l_staged_cnt from hz_staged_contact_points where contact_point_id in
173: (select contact_point_id from hz_contact_points where owner_table_name in ('HZ_PARTIES','HZ_PARTY_SITES'));
174: l_xml_header := l_xml_header ||l_new_line||'
175: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='CONTACT_POINTS'
176: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
177: l_xml_header := l_xml_header ||l_new_line||'
172: select count(contact_point_id) into l_staged_cnt from hz_staged_contact_points where contact_point_id in
173: (select contact_point_id from hz_contact_points where owner_table_name in ('HZ_PARTIES','HZ_PARTY_SITES'));
174: l_xml_header := l_xml_header ||l_new_line||'
175: select count(distinct(party_id)) into l_sync_cnt from hz_dqm_sync_interface where entity='CONTACT_POINTS'
176: and party_id in (select party_id from hz_parties where party_type in ('ORGANIZATION','PERSON'));
177: l_xml_header := l_xml_header ||l_new_line||'
178: l_xml_header := l_xml_header ||l_new_line||'
179: l_xml_header := l_xml_header || l_new_line||'
180: l_xml_header := l_xml_header ||l_new_line||'
293: ' union select ''HZ_STAGE_CONTACT_T1'' index_name, count(*) index_errors from ctxsys.ctx_index_errors where err_index_name like ''HZ_STAGE_CONTACT_T1'' '||
294: ' union select ''HZ_STAGE_CPT_T1'' index_name, count(*) index_errors from ctxsys.ctx_index_errors where err_index_name like ''HZ_STAGE_CPT_T1'' '||
295: ' ) b where ind.index_name like ''HZ_STAGE%T1'' '||
296: ' and ind.table_name in(''HZ_STAGED_PARTIES'',''HZ_STAGED_PARTY_SITES'',''HZ_STAGED_CONTACTS'',''HZ_STAGED_CONTACT_POINTS'') '||
297: ' and st.operation=''CREATE_INDEXES'' and st.step in (''HZ_PARTIES'',''HZ_PARTY_SITES'',''HZ_ORG_CONTACTS'',''HZ_CONTACT_POINTS'') '||
298: ' and (decode(ind.table_name,''HZ_STAGED_PARTIES'',''HZ_PARTIES'') = st.step '||
299: ' OR decode(ind.table_name,''HZ_STAGED_PARTY_SITES'',''HZ_PARTY_SITES'') = st.step '||
300: ' OR decode(ind.table_name,''HZ_STAGED_CONTACTS'',''HZ_ORG_CONTACTS'') = st.step '||
301: ' OR decode(ind.table_name,''HZ_STAGED_CONTACT_POINTS'',''HZ_CONTACT_POINTS'') = st.step) '||
294: ' union select ''HZ_STAGE_CPT_T1'' index_name, count(*) index_errors from ctxsys.ctx_index_errors where err_index_name like ''HZ_STAGE_CPT_T1'' '||
295: ' ) b where ind.index_name like ''HZ_STAGE%T1'' '||
296: ' and ind.table_name in(''HZ_STAGED_PARTIES'',''HZ_STAGED_PARTY_SITES'',''HZ_STAGED_CONTACTS'',''HZ_STAGED_CONTACT_POINTS'') '||
297: ' and st.operation=''CREATE_INDEXES'' and st.step in (''HZ_PARTIES'',''HZ_PARTY_SITES'',''HZ_ORG_CONTACTS'',''HZ_CONTACT_POINTS'') '||
298: ' and (decode(ind.table_name,''HZ_STAGED_PARTIES'',''HZ_PARTIES'') = st.step '||
299: ' OR decode(ind.table_name,''HZ_STAGED_PARTY_SITES'',''HZ_PARTY_SITES'') = st.step '||
300: ' OR decode(ind.table_name,''HZ_STAGED_CONTACTS'',''HZ_ORG_CONTACTS'') = st.step '||
301: ' OR decode(ind.table_name,''HZ_STAGED_CONTACT_POINTS'',''HZ_CONTACT_POINTS'') = st.step) '||
302: ' and a.index_name = b.index_name '||
319: ' AND I.OWNER = P.pnd_index_owner(+) '||
320: ' AND I.INDEX_NAME = E.err_index_name(+) '||
321: ' AND I.OWNER = E.err_index_owner(+) '||
322: ' AND st.operation=''CREATE_INDEXES'' '||
323: ' AND (decode(I.table_name, ''HZ_STAGED_PARTIES'', ''HZ_PARTIES'') = st.step '||
324: ' OR decode(I.table_name, ''HZ_STAGED_PARTY_SITES'', ''HZ_PARTY_SITES'' ) = st.step '||
325: ' OR decode(I.table_name, ''HZ_STAGED_CONTACTS'', ''HZ_ORG_CONTACTS'') = st.step '||
326: ' OR decode(I.table_name, ''HZ_STAGED_CONTACT_POINTS'', ''HZ_CONTACT_POINTS'') = st.step) ');
327: