title: Adding a query to SQL Server Import and Export Wizard
body: <p>I am wanting to update the inv_mast table with an excel spreadsheet. I was able to successfully do this by importing the data as a table and then running the query afterwards and then dropping the table. I am wanting to try and add it to the SSIS package, so I do everything in one step. The excel sheet has ItemID and a Price column to update inv_mast that also has the same columns.</p>
  <p>But I am getting this error when I use the code that I use to already complete the process.</p>
  <pre><code>The statement could not be parsed.
  Syntax error (missing operator) in query expression 'ExcelSheet.price2
  FROM
  P21PLAY.dbo.inv_mast IM
  INNER JOIN
  Sheet1$ ExcelSheet
  ON
  IM.item_id = S.item_id'. (Microsoft Office Access Database Engine)
  </code></pre>
  <p>]<a href="https://i.stack.imgur.com/t7apM.png" rel="nofollow noreferrer">1</a></p>
  <p>Here is the code I have.</p>
  <pre><code>BEGIN TRANSACTION 
  UPDATE
  P21PLAY.dbo.inv_mast
  SET
  P21PLAY.dbo.inv_mast.price2 = ExcelSheet.price2
  FROM
  P21PLAY.dbo.inv_mast IM
  INNER JOIN
  Sheet1$ ExcelSheet
  ON 
  IM.item_id = S.item_id;
  DROP TABLE sheet1$
  </code></pre>