title: How to find a number from a string filed?
body: <p>I need to extract a number from a text field.The tect field is not consistent.</p>
  
  <p>I tried writing substring,but that does not work as the text is not consistent.</p>
  
  <pre><code>CASE WHEN position ( 'CNTRL ', ACTVY_NOTE_TXT) &gt; 0 
              THEN  SUBSTRING ( ACTVY_NOTE_TXT,position ( 'RECORD ID   ', ACTVY_NOTE_TXT)+6, position ( ' [', ACTVY_NOTE_TXT) -  position ( 'RECORD ID   ', ACTVY_NOTE_TXT) -6)
          ELSE NULL END  as DisputeID,
  </code></pre>
  
  <h3>Input</h3>
  
  <pre><code>RCVD 2019-05-06 BOR DISPUTED VIA MAIL- - STATES VICTIM OF IDENTITY THEFT SENT 10030 LIDB LETTER -FRANK CHICK - 525 STELLAR CT 525 - KODAK TN 37764 - -STEP FAILED- CBR DISPUTE CODED IN LAST 6 MONTHS-C106 05 15 2019 13:33:42 MWZ    OPEN ACCT DISPUTE RECORD ID   999703 [PJR748:5 21 2019 12:00:00 AM]
  </code></pre>
  
  <p>The output should be</p>
  
  <pre><code>999703
  </code></pre>