Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
PRINT 'delete all user defined functions'
DECLARE @fn varchar(255)
WHILE (
SELECT Count(*) from dbo.sysobjects f
WHERE type = 'FN' AND f.name not like 'fn[_]%diagram%'
) > 0
BEGIN
SET @fn = (
SELECT TOP 1 name from dbo.sysobjects f
WHERE type = 'FN' AND f.name not like 'fn[_]%diagram%'
)
SET @fn = 'DROP FUNCTION ' + @fn
PRINT @fn
EXEC(@fn)
END