OR Selection

Does anybody know a selection to return records by given selections in the way:

SELECT * FROM Table Where (Field1='A' **OR** Field2='B')

using native Navision. If I set filter to Field1 and Field2 they are combined together with and so Navision issues, to say so, a

SELECT * FROM Table Where (Field1='A' AND Field2='B')

Current I use two iterations, mark the matching records and use the result got by the function MARKEDONLY(). I don’t think this will be speedy with a greater number of records (>250000) [:(] Any suggestion (other than using the SQL Server option) ? Thanks in advance Arno Pucher

If you have keys defined in which Field1 and Field2 are relatively high order, the approach you are using should work quite rapidly. If the fields are first in their keys, your approach should work as quickly as is possible.

Look at form 5827 (Item Statistics) in Attain. It work with table Dimension Code Buffer in triggers OnFindRecord and OnNextRecord. It is very fast Best regards from bcn