title: inserting using where clause in SQL table dynamically
body: <p>I am having a table <code>COMPONENTS</code> of 3 columns (<code>Sno</code>,<code>Component</code>,<code>Quantity</code>) among which I am writing <code>Sno</code> and <code>Component</code> columns initially and I want to fill the column 'quantity' using some expression(ex: <code>((d1+d2)*d3)</code> ) involving variables from another table <strong><code>SHEET(d1 int,d2 int ,d3 int,d4 int ,d5 int,d6 int)</code></strong>.</p>
  
  <p>Here I need to write values to quantity column based on value in Sno column from COMPONENTS table(components.sno).</p>
  
  <p>I used to keep expression value in 'x' and trying to insert into COMPONENTS as shown below:</p>
  
  <pre><code>insert into components(Quantity) values(x) 
  where components.sno='y'; [Y is inetger starting from 0 to 70]
  </code></pre>
  
  <p>But the above query showing error at <code>where</code></p>
  
  <p>Please suggest me best SQL query to achieve this!
  Thanks in Advance..!</p>