title: Computed Column cannot be Persisted
body: <p>I have a custom function, and I am trying to created a persisted column using this function.</p>
  
  <p>It is giving me following error.</p>
  
  <blockquote>
    <p>Computed column 'FormattedSSN' in table 'SomeTable' cannot be persisted because the column is non-deterministic.</p>
  </blockquote>
  
  <p>Here is the function:</p>
  
  <pre><code>ALTER FUNCTION [dbo].[FormatSSN]()
  RETURNS VARCHAR(11)
  AS
  BEGIN
      return '';
  END
  </code></pre>
  
  <p>Here is the query to add the column using the function:</p>
  
  <pre><code>ALTER TABLE SomeTable
  ADD FormattedSSN as dbo.FormatSSN() PERSISTED
  </code></pre>
  
  <p>Please suggest if there is any way out. Thanks.</p>