One way is to build a delimited list in your application based on the user selections. Use a parsing function in your SP to populate a table variable that holds the individual codes. There are lots of parsing routines on this site. check out the "sticky" topic in "new to sql server forum. Here is a simple example of a parsing routine written out within the SP (rather than a generaic UDF):EDIT:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&searchterms=csvalso look through the topic "best split functions"if object_id('dbo.mySP') > 0 drop proc dbo.mySPgocreate proc dbo.mySP @codes varchar(8000)asbegin ------------------------------------------------------------------------------------ --parse the codes into a table variable declare @ci int declare @codeTb table (code varchar(3)) select @codes = ',' + @codes + ',' ,@ci = 1 while charindex(',', @codes, @ci+1) > 0 and charindex(',', @codes, @ci) < len(@codes) begin insert @codeTb (code) values (substring(@codes, @ci+1, charindex(',', @codes, @ci+1)-@ci-1)) set @ci = charindex(',', @codes, @ci+1) end ------------------------------------------------------------------------------------ select Code ,Sid from @codeTb a join myTable b on b.code = a.codeendgoGrant exec on dbo.mySP to <myApplicationAccount>go--Sample Callexec dbo.mySP @codes = 'SR1,SR2,SR3'Be One with the OptimizerTG