Well, and for sake of completeness, the SQL clause VFP also knows for this is LIKE. Indeed CONTAINS as in T-SQL or Oracle SQL (for example
is not available in VFP, as you also don't have the fulltext indexing and searching domain of the SQL language in VFP SQL.
But LIKE works, as in...
Code:
...Where SD_Code Like '%RAP%'
would find any SD_Code with "RAP" inside.
VFP also has the LIKE() and LIKEC() functions to do the same outside of SQL:
Code:
Set Filter To LIKEC('*RAP*',SD_Code)
They differ from the LIKE clause in being a function and - making it unnecessarily unintuitive if you ask me - putting the pattern as the first parameter and not using the SQL placeholder character % but *, as known from file name patterns like '*.*' (for any file with any file extension).
VFP also has some other functions to mimic clauses and operations known from SQL outside SQL, too. The BETWEEN() function can do about the same as an SQL b BETWEEN a and c. Instead you write BETWEEN(b,a,c) and the INLIST function can do about the same as SQL's a in (a,b,c) with INLIST(a, a,b,c). But not in SQL, please, VFP SQL also knows the BETWEEN and IN clauses and it therefore is backwards to use them within SQL.
Anyway, $ also puts what you look for first and you can best remember it when you read it as "is contained in" operator, so "RAP" $ SD_CODE reads "RAP" is_contained_in SD_CODE.
Chriss