Msg 2008, Level 16, State 1, Procedure MyDate, Line 5
The object ‘%.*ls’ is not a procedure so you cannot create another procedure under that group name.
This error message appears when you try to create a procedure with a group number greater than 1, but the object type of the object with the “group number 1” is no of the procedure object type.
The T-SQL statement can be parsed, but causes the error at runtime.
Error of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be executed this way. The procedures must use a different group name.
All version of SQL Server.
IF OBJECT_ID(‘dbo.MyDate’, ‘function’) > 0
DROP FUNCTION dbo.MyDate
CREATE FUNCTION dbo.MyDate()
WITH EXECUTE AS CALLER
CREATE PROCEDURE dbo.MyDate;2
SET NOCOUNT ON
In the above example we try to create a procedure with a group number of 2. Because there is no procedure type object with a group number of 1, the error is raised.