Solved

SQL Select Statement

Posted on 2002-04-26
1
133 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

Integrate social media with email signatures

Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
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…
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). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now