Nottinghamshire beat Sussex in Division One while Leicestershire won their first game in almost three years after beating Essex in Division Two.