tsql - Modifying a function used as a column default in SQL Server -


We are having a problem with a poorly coded SQL function (which works fine in live, but our test environment Not in). This function is used to provide a default value in multiple tables, instead of a function returns a "Can not ALTER ### Because it is referencing this object" error.

Is this error moving in any way the message? The only way I can think is that we are trying to write a script so that it can be removed from each table, which is in the form of default, manipulating the function and adding it again.

Thanks

Since the object is referenced, you can not modify it. This is what you do:

  1. Remove the default barrier from the table / column
  2. Modify the function
  3. Add the default barrier

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -