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 19:18:48
 
 
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:
01271611
Vues:
16
>>>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.
>>
>>I think I may have asked this wrong as everyone seems to be suggesting this approach.
>>
>>In VFE I have the ability to using dynamic view parameters in remote views. Basically the framework will build SQL statements on the fly depending on the params passed with a great amount of control at the DBCX level for how the comparison will be done. I was looking for a TSQL syntax trick in the WHERE that would give me the equivalent to the inline function in VFP with INLIST where no other cursor is required. Perhaps there isn't such a possibility or perhaps Sergey will ride in on a white horse and suggest a UDF I can add to the backend to make this magically possible <bg> ( hey, it worked for MLINE - the new UDF Sergey wrote and posted on his website is a winner )
>
>He doesn't need to ride on a white horse since he already has this function on his website.

I'm pretty sure I never explained this well or our experience of using VFP remote views is different. Parsing the string into a cursor is not the problem. (I created the string from a cursor originally since I couldnt' figure out how to pass the cursor in as a param ) It is a question of how to pass a cursor as a parameter in a remote view so an execsql statement will treat it as the cursor for a correlated subquery.

The ufn_mline function is new and very cool.

Everyone's help has been appreciated.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform