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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored proc using array? 2

Status
Not open for further replies.

jmj

Programmer
Oct 4, 2001
122
US
I have a table that holds an array of id numbers. I'd like to use this in a stored proc to pull up all the info associated with id. Would this be possible?
I can't figure out how to do it because the id is an integer field and the idarray is a varchar field.
For example: I have a wish list of products I want someone to buy me. The idArray holds the ids of all these product (1,3,45,65,756) Now I want to get the product names out..
This is what I'd like to do

Select a.ProdName, a.Price, a.ID
FROM Products a inner join WishList WL on p.ID in (@WishList)
WHERE WishListID=@WishListID
Possible?
Thanks in advance for any ideas. J

 
faq183-5207

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks George. That was quick, simple, and exactly what I was looking for. I'm sure I will get a lot of use out of it! J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top