title: change a query to an update
body: <p>I have the following query:</p>
  
  <pre><code>SELECT        UsersAccountLink.UserId, Customer.Account.AccountNumber, Web.Customer.Name, Web.Customer.Street, UsersAccountLink.AccountId
  FROM            UsersAccountLink INNER JOIN
                           Web.Customer ON UsersAccountLink.AccountId = Web.Customer.AccountId LEFT OUTER JOIN
                           Customer.Account ON UsersAccountLink.AccountId = Customer.Account.AccountId
  WHERE        (Customer.Account.AccountNumber IS NULL)
  Order by Name
  </code></pre>
  
  <p>I need to change the select to and update. I need the UsersAccountLink.UserId to be set to an empty guid if Customer.Account.AcountNumber IS NULL.</p>
  
  <p>I doubt I have this right so here is what I came up with:</p>
  
  <pre><code>UPDATE
      UsersAccountLink
  SET
      UsersAccountLink.AccountId = '00000000-0000-0000-0000-000000000000'
  FROM            
      UsersAccountLink 
  INNER JOIN
      Web.Customer ON UsersAccountLink.AccountId = Web.Customer.AccountId 
  LEFT OUTER JOIN
      Customer.Account ON UsersAccountLink.AccountId = Customer.Account.AccountId
  WHERE        
      (Customer.Account.AccountNumber IS NULL)
  </code></pre>
  
  <p>I based that off this post <a href="https://stackoverflow.com/questions/2334712/update-from-select-using-sql-server">How do I UPDATE from a SELECT in SQL Server?</a></p>
  
  <pre><code>UPDATE
      Table
  SET
      Table.col1 = other_table.col1,
      Table.col2 = other_table.col2
  FROM
      Table
  INNER JOIN
      other_table
  ON
      Table.id = other_table.id
  </code></pre>
  
  <p>Two questions:</p>
  
  <ol>
  <li>Is there a way to test run a query, such as an update or delete, before actually running it?</li>
  <li>Did I convert it to an update correctly?</li>
  </ol>
  
  <p>Thanks!</p>