Delete From pattern ; Where pattern.patid In (Select CurRemove.patid From CurRemove) ; .and. xpat.patid Not In (Select CurExcept.patid From CurExcept)