FROM holding thold left outer join holding yhold on (thold.portid = yhold.portid and thold.securityid = yhold.securityid) inner join security on thold.securityid = security.securityid inner join portfolio on thold.portid = portfolio.portid WHERE thold.date = @asofdate and (yhold.date IS NULL OR yhold.date = @prevdate)I can think of no reason that this wouldn't work.