title: Updating Rows Based on Multiple Tables in SQL Server Compact Edition
body: <p>How to Updating Rows Based on Multiple Tables in SQL Server Compact Edition ?</p>
  
  <p>I have two tables in a database. ActivatedProducts and DocumentSettings.I added new column (UID) in DocumentSettings table,i want to put that UID data from ActivatedProducts (ID) Table with respect to ProductID from ActivatedProducts table</p>
  
  <p>following query's also not working please help me</p>
  
  <pre><code>UPDATE DocumentSettings
  SET UID = 
      (
          SELECT ActivatedProducts.ID
          FROM ActivatedProducts
          WHERE DocumentSettings.TitleID = ActivatedProducts.ProductID
      )
  
  
  UPDATE A
      SET A.UID = B.ID
  FROM DocumentSettings A, ActivatedProducts B
  WHERE A.TitleID = B.ProductID
  
  
  UPDATE DocumentSettings 
      SET [UID]=AP.[ID] 
  FROM  DocumentSettings DS  
  INNER JOIN ActivatedProducts AP ON DS.[Titleid]=AP.[ProductID]  
  </code></pre>