Outer join query


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Outer join query

  1. #1
    Gerald Guest

    Outer join query


    Hi,

    I have two tables I want to query:

    table ClassRegist: fields Employee, Class
    table Reviews: fields Employee, Class

    How do I query the two tables such that it returns ONLY the data in ClassRegist
    that DOES NOT appear in Reviews?

    I've tried doing Outer join but that also returns the Inner data.

    Thanks in advance for the help.



  2. #2
    Eva Guest

    Re: Outer join query


    Gerald,
    May be you are looking for something like that:

    **************************************
    SELECT cr.EMPLOYEE
    FROM ClassRegist cr
    LEFT OUTER JOIN Reviews r
    ON r.EMPLOYEE = cr.EMPLOYEE
    WHERE cr.EMPLOYEE IS NULL

    **************************************

    "Gerald" <ggiam77@yahoo.com> wrote:
    >
    >Hi,
    >
    >I have two tables I want to query:
    >
    >table ClassRegist: fields Employee, Class
    >table Reviews: fields Employee, Class
    >
    >How do I query the two tables such that it returns ONLY the data in ClassRegist
    >that DOES NOT appear in Reviews?
    >
    >I've tried doing Outer join but that also returns the Inner data.
    >
    >Thanks in advance for the help.
    >
    >



  3. #3
    Eva Guest

    Re: Outer join query


    Sorry, it should read:

    >**************************************
    >SELECT cr.EMPLOYEE
    >FROM ClassRegist cr
    > LEFT OUTER JOIN Reviews r
    > ON r.EMPLOYEE = cr.EMPLOYEE
    >WHERE r.EMPLOYEE IS NULL
    >
    >**************************************




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center