title: RTRIM(CLOB field) in Oracle PL/SQL
body: <p>Please suppose I have a CLOB field in an Oracle table, in which I have stored the creation script of a package/procedure/function.</p>
  
  <p>I would like to remove all blanks <strong>at the end of every line</strong>, but:</p>
  
  <p>a) DBMS_LOB.TRIM (CLOB field) is a procedure and not a function;
  b) RTRIM (CLOB) don't fail, but does not work to achieve this.</p>
  
  <p>How can I solve my problem?</p>
  
  <p>Please note that the spaces at the beginning of every line are useful for indentation of the PL/SQL source code stored in the CLOB field, so they haven't to be removed.</p>
  
  <p>Thank you in advance for your kind help and cooperation.</p>