How do I add this line to the below statement?
and cossn is null from table t16pendmvt
I want to check to make sure the cossn in the table t16pendall is not in the table t16pendmvt
select t.fo, Isnull(COUNT(t.cossn), 0)AS PendinFO1
FROM t16pendall t
left join t16pendmvt m
on t.cossn = m.cossn
where mft_POSN1_CD in('b','d') or (MFT_POSN1_CD='a' and aged_alien_rsw='y')
GROUP BY t.fo
order by t.fo
and cossn is null from table t16pendmvt
I want to check to make sure the cossn in the table t16pendall is not in the table t16pendmvt
select t.fo, Isnull(COUNT(t.cossn), 0)AS PendinFO1
FROM t16pendall t
left join t16pendmvt m
on t.cossn = m.cossn
where mft_POSN1_CD in('b','d') or (MFT_POSN1_CD='a' and aged_alien_rsw='y')
GROUP BY t.fo
order by t.fo