Your query will result in null because you have not initialized @mail, use
set @mail = ''
or simply do this
set @mail = ''
select @mail = @mail + email + ';' from reps
where dateterminated is null
and (datediff(dd,eoexpirationdate, getdate()) > 90)
Edited by - davidburrows on 11/14/2003 07:07:55 AM
Far away is close at hand in the images of elsewhere.
Anon.