title: Using an INSERT query that one column came from another table
body: <p>With these tables:</p>
  
  <p><strong>Table1</strong></p>
  
  <pre><code>Date | Barcode | Sold | AmountSold
  </code></pre>
  
  <p><strong>Table2</strong></p>
  
  <pre><code>Barcode | Description | RetailPrice
   00001       Item1         1.00
   00002       Item2         2.00
   00003       Item3         3.00
   00004       Item4         4.00
   00005       Item5         5.00
  </code></pre>
  
  <p>Is there a way to use an <code>INSERT</code> to <code>Table1</code>, like this:</p>
  
  <pre><code>INSERT INTO dbo.Table1
  VALUES ('07/11/2017', '00003', 5, (? * 5))
  </code></pre>
  
  <p>With the <code>?</code> being the <code>RetailPrice</code> <em>(which is <code>3.00</code>)</em> of <code>00003</code> from <code>Table2</code>, then multiplied with <code>Sold</code> <em>(which is <code>5</code>)</em>?</p>
  
  <p>I have stumbled upon <a href="https://www.w3schools.com/sql/sql_insert_into_select.asp" rel="nofollow noreferrer"><code>INSERT INTO SELECT</code></a>, but this requires that all column that will be inserted will have a matching value from <code>SELECT</code>, which I do not need.</p>
  
  <p><strong><em>Note:</strong> the first three values will come from an external source, so the 4th value will be the only one that need to come from another table</em></p>
  
  <p>I can of course use another query first to get the <code>RetailPrice</code> before inserting, but I'm avoiding to use this way to reduce loading time.</p>