Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Filter fro view- IN option
Message
 
To
05/10/1998 19:02:48
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144066
Message ID:
00144083
Views:
31
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform