Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IN clause in Parameterized views
Message
De
02/04/1999 12:41:50
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
 
 
À
01/04/1999 11:26:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00204282
Message ID:
00204694
Vues:
12
?mylist". It doesn't work. Depending on the makeup of the list stored in the mylist variable, it usually only selects the first item in the list. I have tried storing the following strings to mylist:-
>>
>> " 3"," 6"," 7"
>> (" 3"," 6"," 7")
>> 3"," 6"," 7
>> as well as any other variation I could think of. That last one was in case quotes were automatically being put around my string when it was passed. I am
>
>You may create cursor:
>cMystring="('23','48')"
>Select * From mytable Where myfield IN &cMystring. Into Cursor tmp Nofilter
>and print from this cursor

Yeah Edward, that is what I am doing. I did find, however, that it seems to have to be ....WHERE myfield IN (&cMystring).... otherwise VFP tells me "Function missing )". Why I don't know.

What was bugging me was that a parameterized view is so elegant for this type of thing it is a wonder that MS doesn't make the IN clause work with a parameter. Ah well.

Thanks for your input.
***************************
Bruce Gilmour

"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform