5. Working with QBF Operations : QBF Retrieve Operation : Search Qualifications : Logical Operators Within a Column
 
Share this page                  
Logical Operators Within a Column
You can use logical operators within a data column. For example, if you enter Lincoln or Douglas or Tubman in a Lastname field, the query returns records with a value of either Lincoln or Douglas or Tubman in the Lastname column.
You can explicitly enter the AND operator in a field, as you do the OR operator, or you can imply the AND operator by leaving a space between words. For example, entering Delta Gamma is the same as entering Delta and Gamma.
If you want to search for a string of words separated by literal spaces, you must enclose the string with double quotation marks (" "), because QBF otherwise interprets the spaces as implied AND operators.
For most practical purposes, the AND operator is only useful in numeric fields because the AND operator requires that the data in the field meet two separate and exclusive criteria. For example, a number can be both greater than 10 and less than 100.
Because the AND operator is exclusive, it usually returns nothing in a character column. For example, entering 1776 and Adams and Street in an Address field does not return the address 1776 Adams Street because QBF looks for a single field with a value of 1776 and nothing else, a value of Adams and nothing else, and a value of Street and nothing else. Because no field could meet such impossible conditions, no data records can be found.
You can use the AND operator in a character field if you use the greater than (>) and less than (<) comparison operators. For example, entering the search condition >a and <d retrieves all character strings that begin with either b or c.