title: How to execute an SQL statement stored in a shell script variable using isql
body: <p>So, I am trying to execute an SQL statement stored in a shell script variable using isql</p>
  
  <p>Generic code attached.</p>
  
  <pre><code>SQL="select * from Student"
  
  EMPLOYEES=`isql -U $USERNAME -P $PASSWORD -D $DATABASE -S $SERVER&lt;&lt;EOF
  $SQL
  go
  </code></pre>
  
  <p>However on executing this, I get an error such as: Incorrect syntax near the keyword 'Select' and Incorrect suntax near '='</p>
  
  <p>Anyone knows how to execute the SQL query directly stored in a variable from isql?</p>