Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 passing to a stored procedure an array

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2011-08-29 : 07:58:27
how can I can pass to a stored procedure an array

to simplify I want to pass to my stored prodcedure an array of names

and then do a select * from customers where name='' and any of the names passed in?

is this possible?
what's the best way to do this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-29 : 08:11:54
see
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2011-08-29 : 09:01:44
thanks i'm going to try passing xml - seems like it might work best to what I want
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-29 : 10:34:07
ok.let us know how you got on

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -