What are the challenges you face when working across database platforms? Take the survey

Alter or Drop Function

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited November 25, 2005 11:01AM in SQL Compare Previous Versions
Hi Stefan,

I agree that the best option would be to drop and recreate the stored
procedures and functions rather than to try to alter them. That suggestion
has been on the books for quite a while and for a variety of reasons.


Brian Donahue
Red Gate Technical Support

"Stefan Kronberg" <stefan.kronberg@vikingline.fi> wrote in message
> Hi
> After I change the type of a function existing in two synchronized
> (for example scalar-valued to table-valued) I can't synchronize the two
> databases with SQL Compare, because it tries to ALTER the function on the
> other database and this is not allowed as said in Books Online:
> "ALTER FUNCTION cannot be used to change a scalar-valued function to a
> table-valued function, or vice versa. Also, ALTER FUNCTION cannot be used
> change an inline function to a multistatement function, or vice versa"
> The solution would be to Drop the function and re-Create it, or am I
> some option in SQL Compare that I should use in this case ?!
> with regards
> Stefan Kronberg


  • Options
    SQL Compare should now drop any objects that cannot be altered.

    This is different than the issue regarding the request that all objects optionally be dropped and re-created, which doesn't look likely to be implemented at this point.
This discussion has been closed.