Comments
3 comments
-
Having a computer column based on a UDF has been tested and should work perfectly. Maybe if you can post the UDF code, we can see if the problem reveals itself?
-
I've just remembered that the computed column is persisted and has an index on it. Could this be causing problems?
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 -
Following up it seems SQL Compare (5.2) still has a problem synchronizing a view when a column in the view is taken from a table's column that uses a UDF or UDT. This could be responsible for the problem.
Add comment
Please sign in to leave a comment.
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