goal : create a stored procedure that loads a list of strings into a table variable.
I have user defined Table Type as
CREATE TYPE dbo.StringList
AS TABLE
(
item varchar(100)
);
GO
and a stored procedure
USE [theDB]
GO
/****** Object: StoredProcedure [dbo].[GenericStringList] Script Date: 3/14/2017 10:24:22 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GenericStringList] @List AS dbo.StringList READONLY
AS
BEGIN
SET NOCOUNT ON;
SELECT item FROM @List;
END
I understand I would create a datatable to pass into it from c#, but I'd like to test it from the execute stored procedure from SQL Server Management Studio. What I see is
Parameter @List
DataType StringList
?? What goes in Value to test it ??
but it is possible that there is another "text based" way of populating a table-parameters, but if there is I'm not aware of it.
Suggest you do your tests using pure-SQL (e.g. starting from the example I gave and just EXECUTE that in SSMS / similar, and hopefully develop your [GenericStringList] procedure from there