Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple query help
Message
 
 
À
10/01/2012 11:01:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01532616
Message ID:
01532623
Vues:
45
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform