Parameters were not supplied for the function ‘%.*ls’.

Error Message:
Msg 216, Level 16, State 1, Line 1
Parameters were not supplied for the function ‘%.*ls’.

Severity level:
16.

Description:
This error message appears when you don’t supply a value expected by a user-defined function.

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. You must supply values for each parameter in a user-defind function as long as there is not default value for that parameter defined. These supplied values must explicitly or implicitly be convertible to the parameter in question.

Versions:
All versions of SQL Server

Example(s):
USE Northwind
GO
DROP FUNCTION dbo.BogusOrder
GO
CREATE FUNCTION dbo.BogusOrder
(@OrderID INT)
RETURNS TABLE
AS
RETURN
 SELECT OrderID, CustomerID
   FROM dbo.Orders
  WHERE OrderID = @OrderID
GO
SELECT * FROM dbo.BogusOrder

Remarks:
The above function expects the parameter @OrderID. Because a value for this parameter was not supplied in the function cal, the error is raised.




Related Articles :

  • No Related Articles Found

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

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |