title: SQLITE select only numeric values from text field
body: <p>In VB .net I'm wanting to run an sqlite select statement to fetch only numeric values from a text field (a4) which contains both numbers and letters.</p>
  
  <p>My sqlite text a4 field data contains data like this:</p>
  
  <pre><code>  28 days
    1966
    the 100 years war
  </code></pre>
  
  <p>In would like to be able to fetch</p>
  
  <pre><code>  28
    1966
    100
  </code></pre>
  
  <p>The sqlite a4 field has a text data type</p>
  
  <p>This is what I have tried</p>
  
  <pre><code>SELECT a4 from data where CAST(a4 AS INTEGER) GLOB '[0-9]'
  SELECT a4 FROM data WHERE a4 REGEXP '[0-9]'
  </code></pre>
  
  <p>I have search for an answer but only found MS SQL answer that uses ISNUMERIC which doesn't exist in SQLITE.</p>
  
  <p>Thanks</p>