The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

SQL SP's and Lists

Why can't I pass in a list as a SP parameter?

Such as SPGetThisStuff %thislist%

where %thislist%  is a list of keys?

and in the sp have

Select * from foo where key in (@ListOfKeys)
Christopher Hester
Monday, November 21, 2005
Well, to answer your question, I don't know Why you can't do it, but I do know how you could get around it.

You could pass it as a string, i.e. build up the @String to look something like '1,2,3,4,5'

Then your search would be
Select * from foo where fooID in @String .

But you probably already know that.
Celeste L Send private email
Monday, December 12, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz