> What is the best way to pass a list of strings into a stored proc for
> use with an IN operator.

Unfortunately, I don't think there's a good way to do this. There's no
"list" datatype within SQL, so you have to use a large VARCHAR for your
datatype, but there's no way to easily tell SQL that it's a list rather than
a single value.

In the cases where I've had to do this, I've ended up just executing a
string of text within my stored procedure. Using SQL Server 2000, you might
do this using sp_executesql or EXECUTE.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to