title: alter precision of column of a view that is the result of a coalesce
body: <p>I have found several posts online about altering columns of stored procedures and several about altering views - a couple of them being: <a href="https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-view-transact-sql?view=sql-server-2017" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-view-transact-sql?view=sql-server-2017</a> and <a href="https://docs.microsoft.com/en-us/sql/relational-databases/tables/modify-columns-database-engine?view=sql-server-2017" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/sql/relational-databases/tables/modify-columns-database-engine?view=sql-server-2017</a>. What has prompted this whole query is the fact that our version control software flagged a change in the field characteristics. It used to be (30,15) but now it is (28,13)
  Original:</p>
  
  <pre><code>''' Mapped on view Field: ViewName.Function&lt;br/&gt;
  ''' View field characteristics (type, precision, scale, length): Decimal, 30, 15, 0&lt;/remarks&gt;
  </code></pre>
  
  <p>is now:</p>
  
  <pre><code>''' View field characteristics (type, precision, scale, length): Decimal, 28, 13, 0&lt;/remarks&gt;
  </code></pre>
  
  <p>Something tells me that the underlying view / function has to be changed to output the (30,15), though as far as I can tell, nothing has been changed in this view for years. Currently give ViewName.Function evaluates to DECIMAL(12,2). As a side note, I'm having a bit of a challenge understanding how DECIMAL(12,2) is being treated as (28,13) by SSMS. Currently when I go to SSMS > DatabaseName > Views > dbo.ViewName > Columns > AliasName > right click > Properties > Numeric Precision: 28, Numeric Scale: 13. Also, when I right click on the dbo.ViewName > Design, the column contains the coalesce function that has the (28,13) precision. When I right click on that coalesce function and go to properties it just shows the generic properties for the View.
  Anyroad, I need to find a way to get it back to the  original characteristics. Hopefully my query makes sense. Please let me know if I need to share any additional information. </p>