title: Automatically export result sets into csv
body: <p>I have to run several queries on an <code>oracle 11g database</code>, within <code>SQLDeveloper 3.1</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>select * from product;
  select * from customer;
  select * from prices;
  </code></pre>
  
  <p>At the moment I am exporting the resultsets "per hand", I simply right-click<code>onto the result and then</code>export` it.</p>
  
  <p>I would like to automatically save the resultset of each query in a specific folder.</p>
  
  <p>Any recommendation how I could do that?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried using the <code>csv</code> and als the <code>txt</code> extesion of <code>testFile</code>:</p>
  
  <pre><code>spool C:\Users\User\Desktop\testFile.csv --I tried also .txt extension here!!!
  
  set colsep ';'
  
  select * from product;
  
  spool off;
  </code></pre>
  
  <p>However, when I open the file I get for csv and txt the following result:</p>
  
  <pre><code>&gt; set colsep '
  &gt; select * from product
  </code></pre>
  
  <p>I appreciate your replies!</p>