title: Passing Single Parameter that Contains Multiple ID's
body: <p>My problem is that I am trying to pass a single parameter inside of a query. From the backend side I already have all the ID's that I need to pass over to the stored procedure but I get an error <strong>"Conversion failed when converting the varchar value '"1,2,3,4"' to data type int."</strong> from MSSSQL. I have looked into Table-Valued Parameters but I dont that will work in due to it being readonly and I would need to populate it with data coming from the website with the ID's.</p>
  
  <p>This may indeed be a duplicate of another question, but I have tried doing my research and haven't came across anything that seemed to work for this situation.</p>
  
  <h2>Stored Procedure</h2>
  
  <pre><code>USE [DB_9AC5B9_ScoreCardViewer]
  GO
  
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  
  ALTER PROCEDURE [dbo].[GetEmployeeNotionalMargin_RevenueData]
  
      @ReportType varchar(255),
      @StartDate Date,
      @EndDate Date,
      @EmployeeID varchar(255)
  
  AS
  BEGIN
  
      SET NOCOUNT ON;
  
      SELECT 
          DATENAME(MONTH, [Dates].[DateStamp]) AS [MonthName], [Employees].[FirstName], 
          [ScoreCard].[NotionalMargin], [ScoreCard].[Revenue]
      FROM [ScoreCard]
          INNER JOIN [Employees] ON [ScoreCard].[EmployeeID] = [Employees].[EmployeeID] 
          INNER JOIN [Dates] ON [ScoreCard].[DateID] = [Dates].[DateID]
      WHERE 
          [Dates].[ReportType] = @ReportType AND [Dates].[DateStamp] BETWEEN  @StartDate AND @EndDate
          AND [ScoreCard].[EmployeeID] IN 
          (
              @EmployeeID
          )
      ORDER BY [Dates].[DateStamp], [Employees].[EmployeeID]
  
  END
  </code></pre>