-
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.
-
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.
>
>
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks