?
Solved

SQL Select Statement

Posted on 2002-04-26
1
Medium Priority
?
177 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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

764 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