Cannot find either column "dbo" or the user-defined function or aggregate "Function Name", or the name is ambiguous.


The functions is not there in current database.

Here I have created one stored procedure and Inside the procedure, I use one function named "UFN_Test1", But actually the function is not there in current database.

Try to re-produce the Err:
IF OBJECT_ID('USP_Test1','P') IS NOT NULL
DROP PROC USP_Test1
GO
CREATE PROC USP_Test1
AS
BEGIN
SELECT dbo.UFN_Test1()
END
GO


Execute the procedure
EXEC USP_Test1
GO


When executing the procedure, The following Err occurred...

Cannot find either column "dbo" or the user-defined function or aggregate "Function Name", or the name is ambiguous.

How to identify whether the function is there in current database or not ?

IF OBJECT_ID('UFN_Test1') IS NULL
PRINT 'The Object is not there...!'
ELSE
PRINT 'The Object is there...!'

2 comments:

  1. Did you find the solution.?

    ReplyDelete
  2. Thanks for your comment!

    Solution also already posted here!

    ReplyDelete