title: MySQL insert statement (insert into table (columns) select statement)
body: <p>I am trying to insert values into selected columns of table, but only insert the results of a MySQL statement. the select statement works correctly by itself and returns the results.</p>
  
  <p>when combined with the insert statement it is fails with </p>
  
  <pre><code>error incorrect syntax near `dedspgoods`.`case number`.
  </code></pre>
  
  <p>Can anyone assist me with the correct syntax? my erronous syntax is as below:</p>
  
  <pre><code>insert into despgoods_alldetails 
    (`case number`, weight, customer, transporttypename) 
  values 
  ( select despgoods.`case number`
         , despgoods.weight
         , despgoods.customer
         , customers.transporttypename 
    from despgoods 
      inner join customers 
        on despgoods.customer = customers.customer )
  </code></pre>