Jump to content

SP getting a list as a parameter


BryanHood

Recommended Posts

I would like to pass into a SP a string containing a list of items, and then use that list in a Where clause.Example:exec sp_FindFromList '1, 2, 3, 4, 5'

Create Proc dbo.FindFromList    @paramList as VarChar(100)ASSelect  *From   myTableWhere  column1 IN (@paramList)GO

I would like to parse out the list into individual items.Thank you,Bryan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...