select
null action_,
null status_,
null message_,
null modified_columns_,
'Registration' record_type,
jprv.party_reg_id,
jprlv.party_reg_line_id,
to_number(null) reporting_association_id,
jprv.operating_unit,
jprv.party_class_name party_type,
jprv.party_number,
jprv.party_name,
jprv.party_site_name,
jprlv.regime_code registration_regime_code,
jprlv.registration_type_name registration_type,
jprlv.registration_number,
jprlv.sec_registration_type_name secondary_registration_type,
jprlv.secondary_registration_number,
jprlv.assessable_price_list_name assessable_price_list,
jprlv.default_section_name default_tds_section,
jprlv.effective_from registration_start_date,
jprlv.effective_to registration_end_date,
to_char(null) reporting_code_regime_code,
to_char(null) reporting_code_type,
to_char(null) reporting_code,
to_date(null) reporting_code_start_date,
to_date(null) reporting_code_end_date
from
jai_party_regs_v jprv,
jai_party_reg_lines_v jprlv
where
1=1 and
jprv.reg_class_code='THIRD_PARTY' and
jprv.party_reg_id=jprlv.party_reg_id
union all
select
null action_,
null status_,
null message_,
null modified_columns_,
'Reporting Code' record_type,
jprv.party_reg_id,
to_number(null) party_reg_line_id,
jrav.reporting_association_id,
jprv.operating_unit,
jprv.party_class_name party_type,
jprv.party_number,
jprv.party_name,
jprv.party_site_name,
to_char(null) registration_regime_code,
to_char(null) registration_type,
to_char(null) registration_number,
to_char(null) secondary_registration_type,
to_char(null) secondary_registration_number,
to_char(null) assessable_price_list,
to_char(null) default_tds_section,
to_date(null) registration_start_date,
to_date(null) registration_end_date,
jrav.regime_code reporting_code_regime_code,
jrav.reporting_type_name reporting_code_type,
jrav.reporting_code,
jrav.effective_from reporting_code_start_date,
jrav.effective_to reporting_code_end_date
from
jai_party_regs_v jprv,
jai_reporting_associations_v jrav
where
1=1 and
jprv.reg_class_code='THIRD_PARTY' and
jprv.party_reg_id=jrav.entity_id and
jrav.entity_code='THIRD_PARTY'
order by
party_type,
party_number,
record_type,
party_reg_id,
party_reg_line_id nulls last,
reporting_association_id |