Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of VFP INLIST with string of values
Message
From
27/11/2007 18:04:02
 
 
To
27/11/2007 15:50:13
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01271536
Message ID:
01271590
Views:
18
Hi, Charles,

In addition to what others have said (and thanks for the plug, Mike!), a question....I noticed you posted this under SQL 2005. Assuming that's what you're using....there's yet another approach that's even better....it assumes that you can pass your selections as XML. If you're able to pass your selections as XML, you can take advantage of the new XQUERY functions in T-SQL 2005.

I wrote about it last year, here's a link:

http://www.code-magazine.com/article.aspx?quickid=0703041&page=4

Basically I provide a reusable UDF that shreds an XML string into a table variable that you can use in any subsequent JOIN. So you just need to populate an XML string with your selections.

Hope that helps...
Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform