title: Set a row value to a variable in sql
body: <p>I'm trying to set salesorders.pickinglocation to 448 if my salesorder is 68 and salesorderprexies are not 'SO-' OR 'QU-'. Im getting a sytax error . </p>
  
  <pre><code>DECLARE @SalesOrder bigint = 68       --[Identifier]  
  DECLARE @PickingLocation bigint  = 448
  
  set SalesOrders.PickingLocation = @PickingLocation
  
  FROM SalesOrderItems
  inner join salesorders on salesorderitems.salesorder = SalesOrders.SalesOrder
  inner join SalesOrderPrefixes on salesorders.salesorderprefix = SalesOrderPrefixes.salesorderprefix
  
  WHERE SalesOrders.Salesorder = @SalesOrder
  AND SalesOrderPrefixes.SalesOrderPrefixId &lt;&gt;'SO-' AND SalesOrderPrefixes.SalesOrderPrefixId &lt;&gt; 'QU-'
  </code></pre>