I wish to use a filter for an advantage table using multiple values to have an Integer area.
The same SQL could be:
SELECT * FROM TableName WHERE FieldName IN (1, 2, 3)
Can you really perform the same with an AdsTable within needing to repeat the area utilizing an "OR"?
I wish to something similar to:
Filter := 'FieldName IN (1, 2, 3)'
Filter := 'FieldName = 1 OR FieldName = 2 OR FieldName = 3'
You'll be able to make use of the
INLIST function with this. That function is available for Visual FoxPro compatibility. It might seem like:
Filter := 'InList(FieldName, 1, 2, 3)';
However, I don't still find it presently enhanced to make use of a catalog. Therefore if the table is large, it will likely be a lot more efficient to make use of the
FieldName = 1 OR FieldName = 2 ... version from the filter.
IN syntax only works best for the SQL, not for that expression engine which is often used in filters and indexes.
As already recommended by Mark I'd make use of the
FieldName = 1 OR FieldName = 2 ... syntax.
A lot of the
Advantage Expression Engine and
Advantage Optimized filters is incorporated in the help: