sql update function with a left join
<p>I am having some trouble writing a sql update function. I Have a table of quotes and a second table of products associated with those quotes. I am trying to set all the statuses of quotes with certain $ values based on the products. I cant seem to format this query correctly (code below). I know code is limited to 1 ID currently trying to test with 1 before I remove that portion. </p>

<pre><code>sqlStringUpdate = "UPDATE fq SET fq.spQuoteStatus = 5 From factQuote fq (LEFT JOIN FactQuoteProduct as fqp on fq.spQuoteID=fqp.fk_spQuoteID) " &amp; _
"WHERE fq.spQuoteID = 4844 and ((sum(fqp.ItemTotal) &lt;2000 and fq.quoteDate &lt; #" &amp; firstset &amp; "#) or ( fq.bu=3401 and sum(fqp.ItemTotal) &lt;10000 and fq.quoteDate &lt; #" &amp; secondset &amp; "# ) or ( fq.bu&gt;3401 and sum(fqp.ItemTotal) &lt;10000 and fq.quoteDate &lt; #" &amp; secondset &amp; "#));"
</code></pre>

<p>error code: error 3075(syntax error (missing operator) in query expression '5 Left JOIN factQUotePRoduct as fqp on fq.spQUoteID=fqp.fk_spQuoteID')</p>