2

In MSSQL Server 2008 is there a way to construct the flowing as a stored procedure where the ... is passed in as a parameter. And not have to have a "separating" stored procedure or function which splits a csv and returns a table?

select *
from 
    atable
where 
    atable.id in (...)
maxfridbe
  • 5,872
  • 10
  • 58
  • 80
  • Another good article : [TSQL 2008- Table Valued Parameters](http://sqlblogcasts.com/blogs/simons/archive/2008/01/19/SQL-Server-2008-TSQL---Table-Valued-Parameters.aspx) – Shaulian Dec 16 '10 at 09:14

1 Answers1

8

Use a table valued parameter. Here's how to use them from ADO.NET.

Greg Beech
  • 133,383
  • 43
  • 204
  • 250