title: How to extract values from a text CLOB field in SQL
body: <p>I have an SQL table column (BINARYTEXT) populated with a CLOB. Within this CLOB is a number of attributes e.g.</p>
  
  <pre><code>CE.EffDate="20140106";
  CE.CCY="EUR";
  CE.TransactionType="STANDARDEUROPEAN";
  CE.CAL="LON";
  </code></pre>
  
  <p>I need to extract only the value of the CE.TransactionType attribute contained between the double quotes so 'STANDARDEUROPEAN'. Note that the CLOB does not contain XML and only contains attributes as above with no start or end tags.</p>
  
  <p>I have worked out how to do this using the REGEXP_SUBSTR function when I specify the string in the command:</p>
  
  <pre><code>select REGEXP_SUBSTR('CE.TransactionType="STANDARDEUROPEAN"', '="[^"]+') transtype 
  from DUAL
  </code></pre>
  
  <p>which returns: ="STANDARDEUROPEAN</p>
  
  <p>I am unable to manipulate this into using the CLOB as the string. This does not work:</p>
  
  <pre><code>select REGEXP_SUBSTR(BINARYTEXT,'CE.TransactionType="STANDARDEUROPEAN"', '="[^"]+')  transtype 
  from DUAL
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>Steve</p>