Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

I want to join two table and make one view which is key preserved table or view

Shekhar Chandel5 days ago

table1:

CREATE TABLE "CUS_APPS"."WNS_XTR_PARTY_INFO_B"
(
"ACCOUNT_MANAGER" VARCHAR2(50 BYTE),
"ACCOUNT_STATUS" VARCHAR2(14 BYTE),
"AUTHORISED" VARCHAR2(1 BYTE),
"BRANCH_SUBSIDIARY_CODE" VARCHAR2(7 BYTE),
"BRANCH_SUBSIDIARY_YN" VARCHAR2(1 BYTE),
"BROKER" VARCHAR2(1 BYTE),
"BROKERAGE_CATEGORY" VARCHAR2(7 BYTE),
"CLIENT_YN" VARCHAR2(1 BYTE),
"CONTACT_NAME" VARCHAR2(80 BYTE),
"COUNTRY_CODE" VARCHAR2(2 BYTE),
"DEPOSIT_REF" VARCHAR2(10 BYTE),
"EMAIL_ADDRESS" VARCHAR2(80 BYTE),
"FAX_NUMBER" VARCHAR2(15 BYTE),
"FULL_NAME" VARCHAR2(80 BYTE),
"FX_MATCH_ID" VARCHAR2(11 BYTE),
"INTERNAL_PTY" VARCHAR2(1 BYTE),
"PAGER_NUMBER" NUMBER,
"PARTY_CATEGORY" VARCHAR2(2 BYTE),
"PARTY_CODE" VARCHAR2(7 BYTE) PRIMARY KEY , -- Primary Key
"PARTY_GROUP" VARCHAR2(7 BYTE),
"PARTY_TYPE" VARCHAR2(2 BYTE),
"PHONE_NUMBER" VARCHAR2(15 BYTE),
"RISK_PARTY" VARCHAR2(1 BYTE),
"SHORT_NAME" VARCHAR2(20 BYTE)
);


Table 2:

CREATE TABLE "WNS_XTR_USER_DETAILS" (
"USER_ID" NUMBER PRIMARY KEY,
"DEALER_CODE" VARCHAR2(30 BYTE),
"DEALER_NAME" VARCHAR2(150 BYTE),
"APPLICATION_USER_ID" VARCHAR2(20 BYTE),
"CREATION_DATE" DATE,
"CREATED_BY" NUMBER,
"LAST_UPDATE_DATE" DATE,
"LAST_UPDATED_BY" NUMBER,
"LAST_UPDATE_LOGIN" NUMBER,
"APPLICATION_USER_NUMBER" VARCHAR2(150 BYTE)
) ;

---------------------------------------------------------------------------------------------

join condition :

FROM
WNS_XTR_PARTY_INFO_B xpi
LEFT JOIN
wns_xtr_user_details u ON u.dealer_code = xpi.ACCOUNT_MANAGER



Comments
Post Details
Added 5 days ago
2 comments
41 views