title: Substring in Where clause
body: <p>Below is my query, I am looking to pull records where only the substring value (which will be YYYY) is less than current year - 25 years....  and I should mention that this field is varchar and probably needs to be converted which I haven't been able to do successfully either.</p>
  
  <pre><code>SELECT 
              AccountNumber,
              LoanPrimeLongName,
              convert (varchar,LoanOpenDate,103)LoanOpenDate,
              LoanOriginalBalance,
              LoanBalance,
              LoanInterestRate,
              LoanRemainingTermMonths,
              LoanDelqDays,
              LoanDescription
  FROM 
              ARCU.ARCULoanDetailed 
  WHERE 
              (((LOANTYPE = '15'          OR
              LOANTYPE = '16'         OR
              LoanType = '17')            AND
              LoanStatus = 'Open')        AND
              ProcessDate = (CONVERT(VARCHAR, GETDATE(), 112)-1)) AND
              (SUBSTRING (loandescription,1,4) not like '%[^0-9]%')
  
  ORDER BY AccountNumber
  </code></pre>