Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a string of multiple values to a Stored Proc to use in WHERE

Status
Not open for further replies.

sdtucker

Programmer
Sep 3, 2002
5
0
0
US
I am trying to figure out how to pass a string such as
'1, 6, 9' to a Stored Proc to filter a recordset. I can't do a range, I need to be able to pass multiple, out of sequence values.

SIMPLY:
DECLARE @Var as varchar(10)
SET @Var = '1, 6, 9'

SELECT *
FROM

WHERE Table.Column in (@Var)

I have been banging my head! Please Help!!!
 
hi,

have a look at this FAQ

faq183-3132

Hope it helps

Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top