0

Im trying to get a list of names that do not exist in another list

    SELECT [Paid To]
    FROM tbl1
    WHERE [Paid To] not  in
    (select [Name ] 
    FROM tbl2
    )

I dont get any results but when I run a left join query

select top 10 *
from [tbl1] a
left join [tbl2] b
on a.[Paid To] = b.[Name ]

I get the NULLs where the 2 tables dont match. Can anyone help as to why the first query is not working?

using SQL Server 2012

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user2343837
  • 1,005
  • 5
  • 20
  • 31

0 Answers0