locked
need help in left outer join for output RRS feed

  • Question

  • User-644330731 posted

    dear all,

                 I am stuck in left outer join in ORACLE. Below are my two tables and expected output.

    table1 is as below

    F_CODE F_TYPE F_NAME
    500 (null) PAYROLL
    501 F IT.aspx
    502 F MIS.aspx
    503 F FUV.aspx
    504 F PaySlip.aspx
    505 F DataExcel.aspx
    600 (null) LOAN
    601 F LOAN_A.aspx
    602 F LOAN_INW.aspx
    603 F LOAN_APPR.aspx
    604 F VEHL_LOAN.aspx
    605 F frmPF.aspx
    700 (null) REPORTS.aspx
    800 (null) UTILITY
    801 F M_USER.aspx
    802 F CHANGE_PASSWORD.aspx
    803 F ROLL_RIT.aspx

    table 2 is as below

    R_CODE F_CODE R_ADD R_EDIT
    R004 500 Y Y
    R004 502 Y N
    R004 504 Y N
    R004 600 Y Y
    R004 601 N N

    and my expected output should be like

    R_CODE F_CODE R_ADD R_EDIT
    R004 500 Y Y
    R004 501 Y N
    R004 502 Y N
    R004 503 Y Y
    R004 504 N N
    R004 505 null null
    R004 600 null null
    R004 601 null null
    R004 602 null null
    R004 603 null null
    R004 604 null null
    R004 605 null null
    R004 700 null null
    R004 800 null null
    R004 801 null null
    R004 802 null null
    R004 803 null null

    how can i do this in oracle . Table 1 is master table.

    Wednesday, July 2, 2014 5:25 AM

All replies