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:
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||'