I need to write a query that returns all rows from tableA that do not exist in tableB where tableB is in another database. I can't use a simple sub-select so I have to use a left join, I think... The problem is that the query is returning to many rows so I must not have it right.
from tableA a
left join server.db.owner.tableB a1 on a.number = a1.number
where a1.number is null