Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IN() parameterized Views
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00397490
Message ID:
00397620
Views:
10
>Can anybody out there help?
>
>MSDN article Q156631 says quite clearly that the IN() filter condition doesn't work! Thats all very well but how do I do a parameterized view for a numbers of customer IDs when I don't know how many I will need to look for?
>
>Has anybody any good ideas of how to get round this one?

Rather than a p-view with multiple values, create a cursor that contains a record per customer ID, stick the alias of the cursor in the parameter variable, and do something like the following; I've assumed that CustID is the field to match, and it's a C(10) field, and the parameter variable is pvCursorName:
CREATE CURSOR CustNoLst (CustID C(10))
*
*  Insert a record per CustID to include into the cursor CustNoLst
*
pvCursorName = "CustNoLst"
SELECT * FROM MyCusTbl WHERE CustID IN (SELECT * FROM (?pvCursorName))
>
>Thanks in advance
>Jeremy
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform