This is my stored procedure.Someone says using TVP i can get ouput i want. But i am new to sql. So please someone help me, how to pass multiple disposeid's and multiple receiveid's which shown below.Right now i need output only using that I can able to understand what is tvp so someone please edit my SP to pass multiple values in it.
USE [Test]
GO
/****** Object: StoredProcedure [dbo].[up_Get_Customers] Script Date: 09/23/2015 19:10:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[up_Get_Customers]
(
@DisposeId int
)
AS
BEGIN
SELECT C1.DisposeDate,C1.DisposeID,C1.ReceiveDate,C1.ReceiveID
FROM Customers C1
LEFT JOIN Customers C2 ON C1.DisposeID=C1.ReceiveID
WHERE @DisposeId IS NULL OR (C1.DisposeID in (@DisposeId,','))
END
GO