Home Forums SQL Server 2005 T-SQL (SS2K5) Email script RE: Email script
HowardW
One Orange Chip
Points: 29109
More actions
September 24, 2009 at 9:36 am
#1058117
Just wrap the sql to send the email in a IF...BEGIN END
e.g:
if (Some SQL Statement that returns a count of errors) >= 1
begin
print 'send email'
end
else
print 'dont send email'