Basic Comparisons
This section discusses basic SQL comparisons you can use in MinistryPlatform.
Comparisons Without Search Terms
Some comparisons check for values or missing values using the NULL keyword. NULL represents a missing value and NOT NULL represents an existing value.
The valid operators when comparing NULL are "IS" and "IS NOT."
The following query returns records with birth date:
The comparison in the resulting SQL looks like this:
Date_of_Birth IS NOT NULL
The following query returns records without birth dates:
The comparison in the resulting SQL looks like this:
Date_of_Birth IS NULL
Single Value Comparisons
The majority of filter types are single-value comparisons. Each of these requires a single Search Term.
Think of these as mathematical comparisons, even for text and dates. You can compare any piece of text to another using these comparisons because the text acts like a string of numbers in which A < B < C and so on. Dates are also treated as numbers internally.
Text Comparisons
Text values are expressed in single quotes. If you leave out the quotes, the Advanced Search Tool adds them for you.
Text comparisons support exact matches or wildcards so you can match when text is "like" a search term or only when it is exact.
Exact Match
The exact match comparison uses equals:
Display_Name = 'Smith, John'