Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of VFP INLIST with string of values
Message
 
 
To
27/11/2007 18:56:31
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01271536
Message ID:
01346704
Views:
11
Funny that I can not reply to banned members. Anyway, I found the link in the previous message, thanks Kevin again.

>The bottom line here seems to be that there isn't an inline function in TSQL to parse the string and create the correlated subquery all in one gulp, so if I am to pass in a parameter the parameter has to be some kind of non-scalar object -cursor, xml, array whatever.
>
>My original thought was to figure out how to pass a cursor as a param with my remote view than do something like SELECT * from Table where keyfield in (select keyfield from @cursorparam)
>
>I'm going to re-read your Code article as I'm sure it will reveal a technique I will be using for something ( especially in my .net work ) ( By the way this is as good a place as any to reiterate how much I like all of your technical writing and how useful I have found it in understanding a lot of .net stuff. )
>
>I need to step through some framework code here in VFE to see at what points I can intervene in the process of creating remote views with dynamic params to pass a cursor of some kind ( Mike Feltman's off deer hunting this week so I can't goad him into it )
>
>Looks like it's time to crank up Kind of Blue loud and let Trane and Miles ease my mind ...
>
>
>>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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform