title: Patindex in SQL Server 2008 R2
body: <p>I am trying to use the <code>PATINDEX</code> function in SQL Server 2008 R2 to extract the value 3 from the string </p>
  
  <pre><code>Charged Hourly Fee for 3 CR for BCP202DL Personal Development II
  </code></pre>
  
  <p>but I seem to be making a mistake. </p>
  
  <p>I tried </p>
  
  <pre><code>SELECT PatIndex('%[0-9]%', 'Charged Hourly Fee for 3 CR for BCP202DL Personal Development II')
  </code></pre>
  
  <p>which returns the position <code>24</code> yet I want the value <code>3</code>. </p>
  
  <p>Could someone assist with the solution?</p>