Run ALTER on a PROCEDURE that is referenced by another object

1

I'm trying to change / drop the function [xxxx] according to the code.

But I get the following error

Msg 3729, Level 16, State 3, Procedure xxxxx, Line 1 [Batch Start Line 15] 
Cannot ALTER 'dbo.xxxxx' because it is being referenced by object 'bbbbb'

By my searches I saw that there is no way to perform a DDL command for scalar functions with the 'SCHEMABINDING' clause, another point is that the table in which the SELECT query function has no constraint.

ALTER FUNCTION [dbo].[xxxxx]
(
    -- Add the parameters for the function here
    @Cliente as nvarchar(100) 
)
RETURNS bigint
WITH SCHEMABINDING
AS
BEGIN

    RETURN (0)

END
GO

OBS: Yes, I want it to return 0.

I wonder if it's possible to do this DROP/ALTER

    
asked by anonymous 31.08.2018 / 20:23

0 answers