Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of VFP INLIST with string of values
Message
 
À
27/11/2007 15:52:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
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:
01271540
Vues:
23
>>Hi all
>>
>>how would I pass a string of strings as a param to get the equivalent of VFPs INLIST. ( again, a remote view and I'm building a dynamic view parameter ) Can't use a correlated subquery in this case but I have a list of values
>>
>>SELECT * from jobs where INLIST(jobid,'00555','00444','00333')
>>
>>In T sql SELECT * from jobs where jobid IN ( and here I want something like ['00555','00444','00333'] )
>>
>>Using a VFP remote view I can create the sql statement dynamically if I can figure out the syntax acceptable to the back end for the where clause
>>
>>As ever, guidance appreciated
>>
>>TIA
>
>Kevin Goff's book showed good examples of doing this. Basically you pass in a CSV or XML list as a since varchar parameter, parse and put into a temporary table, and do an INNER JOIN.

Kevin Goff has a book?
For T-SQL (Especially if SQL server 2005 is is there)?
Where?
That is something I should buy.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform