Try this:select distinct personnum from VP_TMSHTCOMMENTV42 v where COMMENTTEXT = 'Late' and not exists ( select * from VP_WATPA a join VP_ALLPERSONV42 b on (b.PERSONNUM = a.PERSONNUM) where v.PERSONNUM = a.PERSONNUM and a.POLICYNM = 'Yearly Award' and b.EMPLOYMENTSTATUS = 'Active' and b.HOMELABORLEVELNM5 in ('100141', '100142', '100143', '100144', '100145', '100146', '100147') and b.ISWFCATTENDANCELIC = '1' and b.PAYRULENAME not like '%Salar%' and (WATPASTATUSID = '2') and startdtm = DATEADD(dd, -1, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0)))
Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/