Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using IN operator in parameterized remote view.
Message
 
To
18/06/2001 10:19:09
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00520273
Message ID:
00520649
Views:
20
Cindy,

The numbers are the primary keys stored as integers. I had this working just like you have somewhat described by inserting the values into a table and then doing an "... IN (Select * from selections where cTableName = ?.cTableName and dExecuted = ?.dExecuted)" which worked just fine. However, I just wanted to check to see if someone may have been able to get the IN operator to work by using a parameter with a comma-delimited list of values. Daniel had the solution so it looks like I can discard my table idea.

Thanks for your feedback.

>James,
>
>Are the numbers you're after stored as numeric or character?
>
>How will they be input? How many will there be - 10? 100?
>
>Can you put them in a table and do an inner join from your local table to your remote view?
>
>
>>Daniel,
>>
>>I still get the same result. Is there something I'm missing? I copied your code exactly and still get the same result set.
>>
>>Thanks for your assistance.
>>
>>>James,
>>>Simply add the comma (or any other separator) to the search expression. Make sure that lcList terminates with the separator:
>>>
>>>lcList = '100,101,102,103,'
>>>lcCmd  = 'select cname from customers where CHARINDEX(RTRIM(CAST(icustomerid as char(20)))+',', ?lcList)>0'
>>>? sqlexec(lnHandle,lcCmd)
>>>
>>>HTH
James Moore
Owner/Developer
Ministry Tracking Software, Inc.
www.youthtrack.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform