title: SQLPLUS command line with Windows batch file
body: <p>I want to create a batch file which will open the SQLPLUS [CLI] and will execute some stored sql file and will also store the output to text file.</p>
  
  <p>So I've created this batch file [which does not work].<br>
  These SQL file contains SQL which returns the max number from a table.</p>
  
  <pre><code>sqlplus scott/tiger@DB
  @sql1.sql&gt;data1.txt
  @sql2.sql&gt;data2.txt
  </code></pre>
  
  <p>The problem is it does not executes the SQL files after opening the SQLPLUS</p>
  
  <ul>
  <li>Windows XP  </li>
  <li>Oracle 9i</li>
  </ul>