Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

Appendix

Omnidex Sentinel Character

Alternative

 

Qualification Syntax

 

Appendix

Overview

The Omnidex Sentinel character is used in the criteria of WHERE clause predicates to force Omnidex to interpret the criteria as Omnidex style criteria.

The Omnidex sentinel character is most commonly used with Omnidex ID and Multifind files.

The default is % (percent sign). It can be changed in the Environment declaration of the Omnidex Environment file.

For example, assume the "books" table contains the following book titles:

1. "Peace Accomplished Through War"

2. "Everyone Wants Peace"

3. "The Art of War"

4. "War and Peace"

Using the Omnidex Sentinel Character, you can accomplish the following:

  • Find all books with the BOTH words, "War" and "Peace", in the title:

select * from books where title='%War and Peace'

Two books qualified with this criteria, #1 and #4. Because the Omnidex Sentinel Character is the first character in the criteria, the word "and" is treated as the AND operator instead of part of the title, meaning the criteria is actually title="War" AND title="Peace".

  • Find all books with EITHER word, "War" or "Peace", in the title:

select * from books where title='%War or Peace'

All four books qualified with this criteria because all four books contain either the word "War" or the word "Peace" or both. Because the Omnidex Sentinel Character is the first character in the criteria, the word "or" is treated as the OR operator instead of part of the title, meaning the criteria is actually title="War" OR title="Peace".

  • Find all books with the word "War" but not the word "Peace" in the title:

select * from books where title='%War and not Peace'

Only one book qualified with this criteria, #3, because it is the only book that does not contain the word "Peace" in the title. Because the Omnidex Sentinel Character is the first character in the criteria, the words "and not" are treated as the AND NOT operators, meaning the actual criteria is title="War" AND NOT title="Peace"

An alternative to using the sentinel character to force an "Omnidex" search is to enclose the criteria in parenthesis. For example, instead of '%War and Peace' you could pass '(War and Peace)'. Be sure to place the parentheses inside the quotes.

 

Top