Update user-defined function used by computed column
jstangroome
Posts: 26
We have a table containing a computed column that uses an expression calling a scalar user-defined function.
When we alter our user-defined function we temporarily change the table's computed column expression to (0) or ('') as appropriate for the column data type. We can then alter the user-defined function without dependency errors and then change the table's computed column back to the original expression.
SQL Compare 5.1 apparently cannot currently handle altering user-defined functions in use by computed columns. Perhaps SQL Compare could use the temporary column expression method above or atleast report this dependency as a warning in the Synchronize wizard.
Thanks,
- Jason
When we alter our user-defined function we temporarily change the table's computed column expression to (0) or ('') as appropriate for the column data type. We can then alter the user-defined function without dependency errors and then change the table's computed column back to the original expression.
SQL Compare 5.1 apparently cannot currently handle altering user-defined functions in use by computed columns. Perhaps SQL Compare could use the temporary column expression method above or atleast report this dependency as a warning in the Synchronize wizard.
Thanks,
- Jason
Comments
The UDF itself is quite boring. It takes a few varchar parameters as input and performs some string manipulation to return a varchar result.
- Jason