



CREATE PROCEDURE DBO.[GetNotSentErrorLogCount] @AFromDate varchar(8) = '' AS
SET NOCOUNT ON

SELECT COUNT(FollowUp.FollowUpNumber) AS ErrorLogCount FROM FollowUp WITH (NOLOCK)
INNER JOIN E_Messages_Auto WITH (NOLOCK) ON FollowUp.FollowUpNumber = E_Messages_Auto.FollowUpNumber AND Convert(varchar(8), Date, 112) >= @AFromDate

