Is there a way to force the modification of a User Defined Function upon which depend other objects.
This is the message:
Msg 3729, Level 16, State 3, Procedure FunctionName, Line 22
Cannot ALTER 'FunctionName' because it is being referenced by object 'OtherObject'.
I have 48 objects related to the function and each time I need modify the function is a big pain.
Any help will be much appreciated.
Best Regards
ggpnetwork
Sorry, but AFAIK there is no switch to do so. If you have a computede column are something else bound to that function you have to drop and recreate the referencing object / Column or something else.HTH; Jens Suessmeyer.|||We have currently ran into this issue but found the following solution helpful.
Originally, we were adding a scalar function to a computed column in a table. We received the same error message whenever we attempted to modify the scalar function.
However, if we created a view of the same table and included the scalar function as a column, we were able to modify the scalar without problems. That is to say, we were able to modify the scalar function definition (not the view result) without problems.
Hope this helps,
Daniel
No comments:
Post a Comment