title: How can I pass a variable to a query inside a shell script?
body: <pre><code>while IFS=# read -r process_id source destination type
  do
          echo "Process id: $process_id"
          echo "Source: $source"
          echo "Destination: $destination"
          case "$type" in
                  2)
                  echo "Type is outbound: $type"
                          contact=$(sqlplus -s ${SQLPLUS_INFO} &lt;&lt;EOF
                          SET PAGESIZE 0
                          SELECT email FROM table WHERE partner = '${destination}';
                          exit
                          EOF
                          )
                  echo
                  echo ${contact}
                  echo
                  ;;
  </code></pre>
  
  <p>Based in the code above, how can I pass the value from $destination to the query? The example above is not working, even these other ones:</p>
  
  <pre><code>SELECT email FROM table WHERE partner = '"${destination}"';
  SELECT email FROM table WHERE partner = '$destination';
  </code></pre>