Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of VFP INLIST with string of values
Message
De
27/11/2007 18:04:02
 
 
À
27/11/2007 15:50:13
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01271536
Message ID:
01271590
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform