title: Append to spool file Oracle
body: <p>I have one script file called <strong>Test.sql</strong> in <strong>D:\Scripts</strong> folder and the content of the file is given below</p>
  
  <pre><code>SET SERVEROUTPUT ON
  SET DEFINE OFF
  SPOOL Test.log;
  
  
  SELECT USER_NAME FROM TUP_USER WHERE USER_ID=1432;
  
  
  SPOOL OFF;
  SET DEFINE ON
  SET SERVEROUTPUT OFF
  </code></pre>
  
  <p>I normally execute this by opening command prompt, locate to <strong>D:\Scripts</strong> and give <code>sqlplus username/password@Database</code> and then give <code>@test.sql</code> to execute this and it will generate a log file called <strong>Test.log</strong> </p>
  
  <p>Every time I execute this, it replaces the old file with the new data. I need to  append new data to the file using spool. Is there a way to do that?</p>
  
  <p>Any help would be appreciated. Thanks in advance.</p>