1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Pl/sql with multiple conditions

Discussion in 'SQL PL/SQL' started by Anil123, Oct 6, 2017.

  1. Anil123

    Anil123 Starter

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    TX
    Hi,



    i have two data sets that needs to be comapred and extract the caterogies from Data set x that doesn't match with Data set Y

    Dataset x

    Grade Subject Categories
    6 PE Independent Work
    6 PE Formative
    6 PE Summative
    7 PE Independent Work
    7 PE Weekly Assessment
    7 PE Monthly Assessment

    DataSet Y
    Grade Subject Categories

    6 PE Independent Work
    6 PE Testing
    6 PE Summative
    7 PE Assignment
    7 PE Weekly Assessment
    7 PE Monthly Assessment

    Output should be:

    Grade Subject Categories Correct Category
    6 PE Summative Testing
    7 PE Independent work Assignment1


    Thanks,
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,528
    Likes Received:
    360
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    What have you written to solve this homework problem?:
     
  3. Anil123

    Anil123 Starter

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    TX
    Select x.grade,x.subject,x.categories from x left join y on x.grade = y.grade and x.subject=y.subject where x.categories<>y.categories