There are multiple articles in internet about passing Table-Value parameter in SSIS, but I am wondering that they are all very old and wrong as over complicated, because they want script components or a lot of other things to be done.
So questions are.
- How to pass Table-Value parameter into ADO.NET Source.
- How to pass Table-Value parameter into OLE DB Source.
How to do it best efficient and quickest way
Let's assume Table Value Parameter defined as Type
CREATE TYPE [dbo].[IDs_TVP] AS TABLE(
[ID] [INT] NOT NULL
)
and procedure can be called
DECLARE @ID dbo.IDs_TVP
INSERT INTO @Clients
(
Text
)
VALUES
('1'),
('1'),
('3')
EXEC dbo.GetClients @Clients = @Clients
and procedure defined
CREATE PROCEDURE [dbo].[GetClients]
@Clients dbo.IDs_TVP READONLY
AS
SELECT * FROM @Clients