I am trying to look on the web for a way to create a stored procedure that I can run and then put in multile values and this is the closest I can find:
CREATE TYPE dbo.EmployeeList AS TABLE ( EmployeeID INT ); GO CREATE PROCEDURE dbo.DoSomethingWithEmployees @List AS dbo.EmployeeList READONLY AS BEGIN SET NOCOUNT ON; SELECT EmployeeID FROM @List; END GO
Is it possible? I want to create this procedure so that I can run it on my machine for reporting purposes and be able to put in one employee ID or multilpe and it still works? and I will not need to create a separate stored procedure per report.