Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple query help
Message
 
 
To
10/01/2012 11:01:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01532616
Message ID:
01532623
Views:
46
>>>I'm trying to filter a query with WHERE clause so it finds certain states in a column. How do I do this? Something like this:
>>>
>>>SELECT * FROM table WHERE Bts=0 AND Ost = ('PA','NY')
>>>
>>>only selects PA.
>>
>>
>>SELECT * FROM table WHERE Bts=0 AND Ost  in  ('PA','NY')
>>
>
>
>Thanks. When I try this, I get "Function name is missing )".
>
>SELECT * FROM table WHERE Bts=0 AND Ost in ('PA','NY','NJ','MD','DE') AND Dst in ('WA','OR',CA')
>
>
>EDIT: I tried this and it seems to have worked:
>
>inlist(Ost,'PA','NJ','NY','MD','DE') AND inlist(Dst,'WA','OR','CA')

What is your VFP version? I believe IN worked for quite a while, but may be it was brought to VFP SQL language few versions ago.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform