将表链接到另一个表

问题描述 投票:0回答:1

我正在oracle融合云中创建新的数据模型。我有一个不同的表,我想链接所有这三个。我该怎么办?以下是我使用的表格:

doo_headers_all dha,
ra_terms rt,
ra_customer_trx_all rcta,
hz_cust_site_uses_all bill_hcsua,
hz_cust_acct_sites_all bill_hcasa,
hz_cust_accounts bill_hca,
hz_party_sites bill_hps,
hz_parties bill_hp,
hz_party_site_uses ship_hpsu,
hz_party_sites ship_hps,
hz_parties ship_hp,
hz_addtnl_party_names bill_hapn,
hz_addtnl_party_names ship_hapn

我链接除了DOO_HEADERS_ALL之外的所有这些,我试图搜索我可以使用哪些外键,以便我可以链接它,但我没有看到任何答案。

rcta.term_id = rt.term_id(+)
and rcta.bill_to_site_use_id = bill_hcsua.site_use_id(+)
and bill_hcsua.cust_acct_site_id  = bill_hcasa.cust_acct_site_id(+)
and bill_hcasa.cust_account_id = bill_hca.cust_account_id(+)
and bill_hcasa.party_site_id = bill_hps.party_site_id(+)
and bill_hps.party_id = bill_hp.party_id(+)
and rcta.ship_to_party_site_use_id = ship_hpsu.party_site_use_id(+)
and ship_hpsu.party_site_id = ship_hps.party_site_id(+)   
and ship_hps.party_id = ship_hp.party_id(+)
and bill_hp.party_id = bill_hapn.party_id(+) and bill_hapn.party_name_type (+) = 'PHONETIC'
and ship_hp.party_id = ship_hapn.party_id(+) and ship_hapn.party_name_type (+) = 'PHONETIC'

这是我用来链接除doo_headers_all之外的其他表

datamodel bi-publisher oraclereports oracle-sql-data-modeler
1个回答
0
投票
dha.ORDER_NUMBER = rcta.CT_REFERENCE(+)

要么

dha.SOLD_TO_CUSTOMER_ID = bill_hca.CUST_ACCOUNT_ID (+)

这在很大程度上取决于您的设置。由于你的列表比3个表格长很多,所以“不同的表格,我想要链接所有3个表格”也不是很清楚你的意思。

© www.soinside.com 2019 - 2024. All rights reserved.