title: get the position of same 3 charecter in string if exists using sql?
body: <p>i have 3 charecters common in string like that </p>
  
  <pre><code> ABCxcdk893         --yes 
   xxxABCpoe4
   ABCkkksdlk         --yes
   ABC4899kff         --yes
   er45346gdf
  </code></pre>
  
  <p>now how to iterate through each charecter of all string and get the matched string with pattern like in our case</p>
  
  <pre><code>  %[_ABC_]%[0,7]
  </code></pre>
  
  <p>WHAT I DID ?</p>
  
  <pre><code>       while @i &lt; @len
    begin
  set @char = SUBSTRING(@MyString, @i,1)
  
  if @char not like '%[^a-zA-Z0-9]%'
  begin
  
        ?????--HERE ITERATION
    --  set @char = ''
  
  end
   else
      begin
  
     --PATTERN MAKING?????????
  
    -- set @i = @i + 1
    end
  --set @result =???????
   set @i = @i + 1
   end
  </code></pre>
  
  <p>You will not understand that and  I  know that thing so you can provide me the code that matches 2 3 strings and return same 3 charecter at same place if exxist  I  mean the same pattern exists in 3 strings.</p>