title: update cfquery within a cfloop over a query
body: <p>I am going through all the records in the column vals of the Values table and tranforming any absolute urls to relative urls. I get this error</p>
  
  <pre><code>[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '='.
  </code></pre>
  
  <p>On the 3rd to last line of this block of code:</p>
  
  <pre><code>&lt;cfquery name="getVals" datasource="#dataBase#"&gt;
    Select vals
    FROM Values
  &lt;/cfquery&gt;
  
  &lt;cfloop 
    query = "getVals"&gt;
  
    &lt;cfset val=#vals#&gt;
      &lt;cfset valEdited= REReplace(
        val, 
        '"(https?:\/\/)?(www\.)?(example\.com)(\/)?"', 
        "'index.php'", 
        'ALL'
        )&gt;
  
      &lt;cfquery name="update" datasource="#dataBase#"&gt;
        UPDATE   Values
        SET      vals = &lt;cfqueryPARAM value = #valEdited#&gt;
        WHERE    ID = &lt;cfqueryPARAM value = #getVals.currentRow#&gt;
      &lt;/cfquery&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p>Any ideas on how to fix it?</p>