ZCA_ROLLUP_LINKED_PARTIES_V

Details

  • Schema: FUSION

  • Object owner: HZ

  • Object type: VIEW

Columns

Name

MASTER_FLAG

CONTEXT_PARTY_ID

LINKED_PARTY_ID

LAST_UPDATE_DATE

Query

SQL_Statement

SELECT master_flag, context_party_id, linked_party_id, MIN(last_update_date) AS last_update_date FROM(

SELECT

lm.master_flag,

dl.master_id context_party_id,

lm.record_id linked_party_id,

dl.last_update_date

FROM

zch_dedup_links_b dl,

zch_dedup_link_members lm

WHERE

dl.dedup_link_status = 'A'

AND lm.dedup_link_id = dl.dedup_link_id

AND lm.effective_start_date <= trunc(sysdate + 1)

AND ( lm.effective_end_date >= trunc(sysdate)

OR lm.effective_end_date IS NULL )

AND lm.restore_flag = 'N'

AND dl.dedup_link_type = lm.dedup_link_type

AND lm.dedup_link_type = 'B2F_EQUIV'

AND dl.data_set_uuid = lm.data_set_uuid

AND lm.data_set_uuid = '47343de0-77e4-36b5-9697-dd51a77826c2'

UNION

SELECT

'Y',

lv.master_id context_party_id,

lv.master_id linked_party_id,

lv.last_update_date

FROM zch_dedup_links_b lv

WHERE lv.dedup_link_status='I'

AND lv.dedup_link_type='B2F_EQUIV'

AND lv.data_set_uuid = '47343de0-77e4-36b5-9697-dd51a77826c2')

GROUP BY master_flag, context_party_id, linked_party_id