title: Unexpected string literal when I'm trying to load the result of the query on a table (bq load)
body: <p>I'm using the bq command line to load the result of a query on a table and then running another query to append the result on the same table. Basically what I'm trying to do is remove duplicates from a incremental table. But I'm getting an error when I try to execute the script.</p>
  
  <p><code>Syntax error: Unexpected string literal "select r.* from test_table.reservations r where id ..." at [1:1]</code></p>
  
  <p>The part of the script where I'm facing the error:</p>
  
  <pre><code>query_wo_inc="select r.* 
  from test_table.reservations r
  where id NOT IN (select id from inc_table.reservations);"
  
  test_query_wo_inc=\"$(echo $query_wo_inc)\"
  echo $query_wo_inc
  
  bq query --use_legacy_sql=false --destination_table='staging_test_table.'reservations $test_query_wo_inc
  
  # load the incremental data on the staging table
  query_inc="select r.* from inc_table.reservations r"
  test_query_inc=\"$(echo $query_inc)\"
  echo $query_inc
  
  bq query --use_legacy_sql=false --append_table=true --destination_table='staging_test_table.'reservations $test_query_inc
  if [ $? -ne 0 ];then
  echo "could not create the staging table"
  exit 
  fi
  # re-create the full table
  bq rm -f -t test_table.reservations
  bq cp staging_test_table.reservations test_table.reservations
  bq rm -f -t inc_table.reservations
  </code></pre>