I created a stored proc in SQL Server 2012 using the following:
CREATE TYPE dbo.EncTypeFilter
AS TABLE
(
EncTypeFilterID int
);
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE GetExplorerData
@EncTypeFilterList AS dbo.EncTypeFilter READONLY
AS
BEGIN
...
END
I get the error "Operand type clash: varchar is incompatible with EncTypeFilter" when I call the procedure with the following command:
EXEC GetExplorerData @EncTypeFilterList='(1,2,3,4)'
So, how do I pass a list of Ints as a param to the procedure?