Trying to figure how how to replace the following, with equivalent left outer join:
select distinct(a.some_value)
from table_a a, table_b b
where a.id = b.a_
I'm not convinced a left join is the way to go but I believe it would look like this:
select *
from
(
select *
from a
where a.CreateDate >= '12/1/2013'
and a.CreateDate < '1/1/2014')December
left join(
select *
from b
where b.CreateDate < '12/1/2013')PriorMonths on December.Value = PriorMonths.Value
where PriorMonths.Value is null
How about a "not exists" clause?
TechnetArticle
S/O question about In, Left Join, and Not Exists
select *
from a
where a.CreateDate >= '12/1/2013'
and a.CreateDate < '1/1/2014'
and not exists(
select *
from b
where b.CreateDate < '12/1/2013'
and b.[Value] = a.Value)