title: Unable to update data using SQL*Plus command in shell script
body: <p>I have a select query embedded in to my SQL*Plus command as shown below.</p>
  
  <pre><code>ret_val=`sqlplus -S "$user/$pwd@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST=$host)(PORT=$port)))(CONNECT_DATA =(SID=$sid)))"&lt;&lt;EOF&gt;temp.dat                     
                WHENEVER SQLERROR EXIT 2;
                WHENEVER OSERROR EXIT 3;
                select * from my_table;
                commit;
                exit;
                EOF`
  </code></pre>
  
  <p>It works all fine and promptly writes the result set of the select query in to the temp.dat file. But the below command with an update query doesn't seem to work. The screen is hung up waiting for me to input rather than updating the database.</p>
  
  <pre><code>ret_val=`sqlplus -S "$user/$pwd@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST=$host)(PORT=$port)))(CONNECT_DATA =(SID=$sid)))"&lt;&lt;EOF&gt;temp.dat                     
                WHENEVER SQLERROR EXIT 2;
                WHENEVER OSERROR EXIT 3;
                update my_table set my_column = 123 where id = 1;
                commit;
                exit;
                EOF`
  </code></pre>
  
  <p>When i terminate it by pressing Ctrl+C and open up the temp.dat file I see an error message as shown below.</p>
  
  <pre><code>ERROR at line 1: ORA-01013: user requested cancel of current operation
  </code></pre>
  
  <p>I am working on K Shell with Oracle database. Please let me know what I am missing here.</p>