title: Convert from hex-encoded CLOB to BLOB in Oracle
body: <p>I have some large binary content in hex form stored in a CLOB and want to convert that to a BLOB where the hex code is actual binary byte encoding:</p>
  
  <pre><code>DECLARE
  
    -- This would be my 8 byte hex-encoded binary content. Real content is much bigger
    c CLOB := 'cafebabe12345678';
    b BLOB;
  BEGIN
  
    -- Need the implementation of this function
    b := hex_to_blob(c);
  END;
  /
  </code></pre>
  
  <p>What's the easiest way to do that in Oracle, using PL/SQL?</p>