title: Coldfusion Update SQL statement
body: <p>I have the following query which does a table update referencing data from data read in using cfspreadsheet.(approx 600 rows)and is referneced as qry1.
  The SQL runs around 2 minutes to completion.
  Can I improve the SQL to improve the update timings?
  The products table has 1360000 rows in it.
  This example is updating 600 of those rows.
  Oracle version is 11g
  Coldfusion Version is 9.1</p>
  
  <pre><code>&lt;cfloop from="1" to="#qry1.recordcount#" index="i"&gt;
      &lt;cfquery name="qry2" datasource="db1"&gt;
          UPDATE PRODUCTS P
          SET P.QTY = &lt;cfqueryparam value="#qry1.ITEM_NEW_INCOMING_QUOTE_QTY#" cfsqltype="cf_sql_numeric" /&gt;
          WHERE P.PRODUCT= &lt;cfqueryparam value="#qry1.PRODUCT#" cfsqltype="cf_sql_varchar"  /&gt;
          AND EXISTS(
              SELECT QUOTE_ID
              FROM QUOTE Q
              WHERE P.QUOTE_ID = Q.QUOTE_ID
                  AND Q.QUOTE_NUMBER = &lt;cfqueryparam value="#Val(qry1.QUOTE_NUMBER)#" cfsqltype="cf_sql_numeric" /&gt; 
              )
      &lt;/cfquery&gt;
  &lt;/cfloop&gt;
  </code></pre>