Procedure or function %1! has too many arguments specified.

Error Message:
Msg 8144, Level 16, State 2, Procedure %1!, Line 0
Procedure or function %1! has too many arguments specified.

Severity level:
16.

Description:
This error message appears when you try to call a stored procedure and supply more parameters than have been declared for that procedure.

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 parameter list for the stored procedure call must be corrected.

Versions:
All versions of SQL Server.

Example(s):
USE Northwind
GO
CREATE PROCEDURE dbo.GetSomething (@orderId INT)
AS
 SET NOCOUNT ON
 SELECT *
   FROM dbo.Orders
  WHERE OrderID = @orderID
  RETURN 0

GO
EXEC dbo.GetSomething 10002, 10003
DROP PROCEDURE dbo.GetSomething

Remarks:
In the above example the error is raised, because the stored procedure dbo.GetSomething is called with 2 parameters in its parameter list, but only 1 parameter (@orderID) has beeen declared while creating the procedure.

]]>

Leave a comment

Your email address will not be published.