Left Outer Join with 'NOt IN' statement
Posted on 2007-07-24
Hi - I am tasked to create a merged database from a few highly disparate databases on multiple servers. I dumped some of the raw data from two databases into a MS SQL server (which contains the third set of data). What is wrong with the following query? It returns no records, but a quick look at the tables confirms it should return many.
Select WC.Col001 AS Email, MCD.Fname, MCD.Lname, MCD.Address, MCD.Address2, MCD.City, MCD.State, MCD.Zip, MCD.Country, MCD.DoNotSend, MCD.SCMClient, MCD.LastSubRate, MCD.LastTransactionDate
FROM PRO AS WC left outer join MarkClientDump as MCD
on WC.Col001 = MCD.Email
where WC.Col001 NOT IN (select Col018 from SSIA_DATADUMP);