Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL 101 (again)
Message
From
22/07/2002 18:58:35
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00681356
Message ID:
00681399
Views:
28
>Thanks for the response, Al.
>Could you give me an example of the 'IN' syntax?

From VFP7 help for SELECT - SQL, Example 7:
Example 7 displays FilterCondition in the form of FieldName [NOT] IN Value_Set

When the filter condition includes IN, the field must contain one of the values before its record is included in the query results.

customer.postalcode NOT IN ("98052","98072","98034")
This example uses character values. If your case uses numeric values, remove the quotes. You would typically build the entire SELECT command as a string variable and pass that as one of the parameters to your SQLEXEC() function call.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform