title: Update column from another join column ,,
body: <p>First it should be easy for the DB'es but its really giving me pain here i dont know why ,, </p>
  
  <p>I have two tables , [Table1] named Applicationforms and [Table2] named WFInstance
  i need to update the FormSubmitDate in Table1 with the startedDate value in table 2 
  where the FormSubmitDate is null. 
  I write the following query </p>
  
  <pre><code>UPDATE    ApplicationForm
  SET              FormSubmitDate = wfi.StartDate
  FROM         ApplicationForm app ,
                        WorkFlowInstances wfi
  
  WHERE     app.FormSubmitDate is null and wfi.applicationID = app.ID 
  </code></pre>
  
  <p>when i run the query the SQL regenerate the query to this one,, </p>
  
  <pre><code>UPDATE    ApplicationForm
  SET              FormSubmitDate = wfi.StartDate
  FROM         ApplicationForm AS app INNER JOIN
                        WorkFlowInstances AS wfi ON app.ID = wfi.ApplicationID CROSS JOIN
                        ApplicationForm
  WHERE     (app.FormSubmitDate IS NULL)
  </code></pre>
  
  <p>I tried to write another statment using join ,, </p>
  
  <pre><code>UPDATE ApplicationForm
  SET FormSubmitDate = wfi.StartDate
  FROM ApplicationForm 
  JOIN WorkFlowInstances wfi ON ApplicationForm.ID = wfi.ApplicationID 
  WHERE  FormSubmitDate is null
  </code></pre>
  
  <p>and the SQL generate the same new syntax,, </p>
  
  <p>now when i run the code , [all records] formSubmitDate fields filled with the first value of second table startDate. even if i have one record contains null value in table1</p>
  
  <p>What i am missing here !?</p>