Solved

SQL Select Statement

Posted on 2002-04-26
1
150 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
1 Comment
 
LVL 6

Accepted Solution

by:
xSinbad earned 50 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Deploying Windows 10 in MDT 18 67
Undelete of overwritten files 27 81
default domain policy exemptions 4 34
Install both Office 2010 and 2013 4 35
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

786 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