Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
powerbiastra1
Frequent Visitor

Bring together 2 tables

I have two tables with data as below

 

as you can see columns pp and comm combination is matching only for one value

 

so how do I bring these 2 tables together ? A simple full outer join in oracle will do ?

Any other ideas are appreciated, thanks


CREATE TABLE PIGGYBANK(EDATE DATE,COMM VARCHAR2(20),PP VARCHAR2(20), BMONTH NUMBER,
CAMOUNT NUMBER);

INSERT INTO PIGGYBANK VALUES ('17-OCT-2022','ABC_COM','ABC_PP',202211,200);
INSERT INTO PIGGYBANK VALUES ('17-OCT-2022','FL_COM','FL_PP',202211,300);
INSERT INTO PIGGYBANK VALUES ('17-OCT-2022','CA_COM','CA_PP',202211,500);
INSERT INTO PIGGYBANK VALUES ('17-OCT-2022','PEN_COM','PEN_PP',202211,200);
INSERT INTO PIGGYBANK VALUES ('17-OCT-2022','XYZ_COM','XYZ_PP',202211,350);


CREATE TABLE CBANK(CDATE DATE,CLEVEL VARCHAR2(10),COM VARCHAR2(20),PP VARCHAR2(20),
CM NUMBER, PRICE NUMBER);

INSERT INTO CBANK VALUES('17-OCT-2022','C10','ABC_COM','ABC_PP',202211,30);
INSERT INTO CBANK VALUES('17-OCT-2022','C12','ABC_COM','ABC_PP',202211,50);
INSERT INTO CBANK VALUES('17-OCT-2022','C5','ABC_COM','ABC_PP',202211,40);

INSERT INTO CBANK VALUES('17-OCT-2022','C10','npc_COM','npc_PP',202212,32);
INSERT INTO CBANK VALUES('17-OCT-2022','C12','npc_COM','npc_PP',202212,56);
INSERT INTO CBANK VALUES('17-OCT-2022','C5','npc_COM','npc_PP',202212,77);

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

Hi @powerbiastra1

 

Would you consider publishing the final expected output of tables that merged together?

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Unfortunately my user is not able to  give me that info, so I came up with above sample tables

Hi @powerbiastra1 ,

 

What I want is the output after combining the above two sample tables. Would you tell me what its results look like? Take a screenshot in excel as well.🙂 thanks.

 

Best Regards,
Gao

Community Support Team

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.