This project has moved and is read-only. For the latest updates, please go here.

Simple OR query

Nov 12, 2013 at 11:29 AM
Edited Nov 12, 2013 at 11:30 AM
I apologize for asking a seemingly dumb question, but is there an elegant way to perform a very simple OR query ?

Let's assume a table with columns; Firstname, Lastname, Social Security Number, Marital Status and Age. Primary Index set on Social Security Number.

I understand how to construct queries for "Ages between 20 & 30" or queries for "Age > 50 AND Marital Status = 'Widowed'" but for life of me can't work out how to elegantly construct a simple query over one column, for example a search for Marital Status='Single' or Marital Status='Divorced' or Marital Status='Widowed' ?

Or do I have to perform three separate queries using the standard JetSetIndex, JetMakeKey, JetSeek palaver.
Nov 12, 2013 at 8:51 PM
The simplest is to do the three separate queries.
Or you could probably use JetIntersectIndexes. It's usually used with different indexes, but it may work with different JET_TABLEID's using the same index.
And there's a bit about the costs at: