title: importing data into CSV from a remote oracle server, I need to use a spool like command in Windows
body: <p>I need to write a similar script in windows in a bat/cmd file. This script gets my data in csv on linux. I was wondering if there is any equivalent in windows box.</p>
  
  <pre><code>FILE="test.csv"
  
  sqlplus username/passwd@database &lt;&lt;EOF
  
  SET PAGESIZE 50000
  SET COLSEP ","
  SET LINESIZE 200
  SET FEEDBACK OFF
  
  SPOOL $FILE
  
  SELECT * FROM test_table ;
  
  SPOOL OFF
  EXIT
  EOF
  </code></pre>