- Suppose I have an application that searches for cars.
- I want to find all of the cars that are Blue or Green and are made by Honda or Toyota
In SQL I would write:
(Blue OR Green) AND (Honda OR Toyota) AND (Other Stuff)
In Filemaker I seem to need to do this:
(Blue AND Honda AND Other Stuff) OR
(Green AND Honda AND Other Stuff) OR
(Blue AND Toyota AND Other Stuff) OR
(Green AND Toyota AND Other Stuff)
You would use a Compound Search to achieve this.
The issue is the more ORs in the search, the more queries will be produced.
1 would produce 2 searches.
2 would produce 4 searches.
3 would produce 8 searches.
10 would produce 1024 searches.
n would produce 2 to the power of n (2^n) searches (exponential = ahh!).
This is only if each OR has 2 choices.
So my question is: Can I write one statement that does this (like in SQL) instead of creating thousands of queries?