BVNetwork.NotFound.Core.Data.DataAccessBaseEx.DeleteSuggestions C# (CSharp) Method

DeleteSuggestions() public method

public DeleteSuggestions ( int maxErrors, int minimumDaysOld ) : void
maxErrors int
minimumDaysOld int
return void
        public void DeleteSuggestions(int maxErrors, int minimumDaysOld)
        {
            string sqlCommand = string.Format(@"delete from {0}
                                                where [OldUrl] in (
                                                select [OldUrl]
                                                  from (
                                                      select [OldUrl]
                                                      from {0}
                                                      Where DATEDIFF(day, [Requested], getdate()) >= {1}
                                                      group by [OldUrl]
                                                      having count(*) <= {2}
                                                      ) t
                                                )",REDIRECTSTABLE, minimumDaysOld, maxErrors);
            ExecuteSQL(sqlCommand, null);
        }