Alter or Drop Function

Brian DonahueBrian Donahue Posts: 6,590 New member
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.

Regards,

Brian Donahue
Red Gate Technical Support

"Stefan Kronberg" <[email protected]> wrote in message
news:[email protected]
> Hi
>
> After I change the type of a function existing in two synchronized
databases
> (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
to
> 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
missing
> some option in SQL Compare that I should use in this case ?!
>
> with regards
> Stefan Kronberg
>
>

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.