Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Select Statement

Posted on 2002-04-26
1
Medium Priority
?
184 Views
Last Modified: 2013-12-28
I'm fairly new to SQL, but need to know how to do the following.

I have 2 tables (table A and Table B) both have employees. I want to know the total number of employees in table A that do not exist in table B). The comlexity is that some of the emplyees in table A are repeated therefore they may exist more than once in table A but will only have one record if they exist in table B.

Many thanks !!

Pardeep

0
Comment
Question by:pardeep_nagra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
xSinbad earned 200 total points
ID: 6976127
What are the field names in these tables? Something like this should do the job.


SELECT DISTINCT tblA.*
FROM tblA LEFT JOIN tblB
ON tblA.EmployeeName = tblB.EmployeeName
WHERE tblA.EmployeeName is null

Cheers
Marcus
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question