title: SQL query with ISNULL and computed column does not return result
body: <p>I have this query in Sql 2012:</p>
  <blockquote>
  <p>SELECT Id, Periodo, Due, Paid, Balance, Expenses, Notes, Completato,
  Data_pag, Ritardo FROM dbo.affitto_sa</p>
  </blockquote>
  <p>Which working fine and returns the data as per top part of the picture:</p>
  <p><img src="https://i.stack.imgur.com/HnCgO.jpg" alt="enter image description here" /></p>
  <p>I am now trying to replace null values in the column Data_pag with the system date(now).
  I have tried this query which returns the data in the bottom part of the picture:</p>
  <blockquote>
  <p>SELECT Id, Periodo, Due, Paid, Balance, Expenses, Notes, Completato,
  ISNULL(Data_pag, SYSDATETIME()), Ritardo FROM dbo.affitto_sa</p>
  </blockquote>
  <p>The problem I am experiencing is that the column name &quot;Data_pag&quot; disappears and even if the null value is correctly replaced, the value in column &quot;Ritardo&quot; is not calculated. This column &quot;Ritado&quot; has the following computed formula &quot;(datediff(day,[Data_pag],[Periodo]))&quot; and is set to persistent.
  How can I solve the two problems: Column name and get the result of the expression computed?</p>