I found some examples of what I thought I wanted to do but I must of screwed it up.What do I need to change the code below to get devices NOT used?What I have is 2 tables.  PunchOrigin has time and device used today.  DCMDevice has all of the devices in the network.select left(right(INDEVICENAME,7),6) as Device, count (INDEVICENAME) as DeviceCountfrom  dbo.VP_PUNCHORIGIN where year (eventdate) = year(getdate())and  month (eventdate) = month(getdate())and    day (eventdate) = day(getdate()) and not INDEVICENAME is NULLand not left(right(INDEVICENAME,7),6) in (Select DEVICEID from dbo.DCMDEVICE)group by INDEVICENAMEorder by Device
What I am getting is a list of Devices not in the DEVICEID table with counts.  I want, what is in the DEVICEDID  table where counts are equal zero.Here is the output I'm getting but I do not want.Device	DeviceCount004402	36004502	11004703	13006402	54006602	12006802	35090503	17Hoping to get something like:Device	DeviceCount127002         	0900001         	0900002         	0909001         	0999001         	0999993         	0_______________________________________________________________________________How do you measure success? Money? Career? Health? Stuff? Relationships? Success and Purpose in Life go hand in hand. If you want to fulfill YOUR purpose in life you need to find out what it is. I do this by accomplishing GOD’S purpose for my life.