Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IN() parameterized Views
Message
De
27/07/2000 11:49:07
 
 
À
27/07/2000 11:30:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00397490
Message ID:
00397644
Vues:
14
>>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"
*
*  NB - do the following:
*
USE MyPView
*
*  And this is the basis of the view creation:
*
CREATE SQL VIEW MyPView AS ;
  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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform