The object ‘%.*ls’ is not a procedure so you cannot create another procedure under that group name.

Error Message:
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.

Severity level:
16.

Description:
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.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
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.

Versions:
All version of SQL Server.

Example(s):
USE tempdb;
GO
IF OBJECT_ID(‘dbo.MyDate’, ‘function’) > 0
 DROP FUNCTION dbo.MyDate
GO
CREATE FUNCTION dbo.MyDate()
RETURNS DATETIME
WITH EXECUTE AS CALLER
AS
BEGIN
 RETURN (GETDATE())
END;
GO
CREATE PROCEDURE dbo.MyDate;2
AS
SET NOCOUNT ON
SELECT GETDATE()
RETURN 0
GO

Remarks:
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.




Array

No comments yet... Be the first to leave a reply!