title: How to check if first five characters of one field match another?
body: <p>Assuming I have the following table:</p>
  
  <pre><code>AAAAAA
  AAAAAB
  CCCCCC
  </code></pre>
  
  <p>How could I craft a query that would let me know that <code>AAAAA</code> and <code>AAAAB</code> are similar (as they share five characters in a row)? Ideally I would like to write this as a query that would check if the two fields shared five characters in a row anywhere in the string but this seems outside the scope of SQL and something I should write into a C# application?</p>
  
  <p>Ideally the query would add another column that displays: <code>Similar to 'AAAAA', 'AAAAB'</code></p>