Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Filter fro view- IN option
Message
 
À
05/10/1998 19:02:48
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144066
Message ID:
00144083
Vues:
32
>I am creating a parameterized view for my grid where I am trying to get a city or cities to show up. I create a list of all applicable cities and then select the ones I want and put them into a property of the form ccities as "Calgary","Edmonton" and so on. The SQL is
>
>
>SELECT *;
> FROM geo!homechk;
> WHERE ALLTRIM(Homechk.city) IN (?thisform.ccities);
> ORDER BY Homechk.city, Homechk.lastname, Homechk.firstname
>
>
>Only those records matching the first City are selected. I have tried this in the View designer and get the same results. Typing in a list of the cities works fine but as soon as you specify a parameter - no matter how you type in the list when it asks - it only matches to the first city in the list. What am I missing. TIA

Bruce,

View parameters want to be single values. For the view you are trying to create try it his way;
cListCities = THISORM.cCities
SELECT *;
 FROM geo!homechk;
 WHERE ALLTRIM(Homechk.city) IN (&cListCities);
 ORDER BY Homechk.city, Homechk.lastname, Homechk.firstname
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform