Which logical operator is used to find values that fall within a specific range?

Addition (+)

Description
This operator provides the sums of two numbers. Basic arithmetic operator used for addition; the result of an arithmetic operator is usually a numeric value.

Syntax
[expression1] [expression2]

Comments
Although the + operator can be used to concatenate two character strings, the & operator should be used for concatenation to eliminate ambiguity and provide self-documenting code. If + operator is used, there may be no way to determine whether addition or string concatenation will occur. The underlying subtype of the expressions determines the behavior of the + operator in the following way:

If

Then

Both expressions are numeric Add
Both expressions are strings Concatenate
One expression is numeric and the other is a string Add

If one or both expressions are Null expressions, the result is Null. If both expressions are Empty, the result is an integer subtype. However, if only one expression is Empty, the other expression is returned unchanged as a result.

Example

READ {.ProjectsSampleSample.prj}:Oswego 
DEFINE Newvar NUMERIC 
ASSIGN Newvar = Age + 5
LIST Age Newvar

ARITHMETIC

Description
These basic arithmetic operators can be used in combination with other commands. The result is a numeric value.

Syntax
[Expression] [Expression]

  • [Expression] is a numeric value or a variable containing data in numeric format.

Comments
The results are expressed in numeric format. The basic mathematical operators that can be used in Epi Info are as follows:

  • Addition + Basic arithmetic operator used for addition; the result of an arithmetic operator is usually a numeric value (i.e., EX. 3 + 3).
  • Subtraction – (Used for subtraction or negation.) Basic arithmetic operator used for subtraction or negation; the result of an arithmetic operator is usually a numeric value (i.e., EX. 3 – 1).
  • Multiplication * (Asterisk) Basic arithmetic operator used for multiplication; the result of an arithmetic operator is usually a numeric value.
  • Division / Basic arithmetic operator used for division; the result of an arithmetic operator is usually a numeric value.
  • Exponentiation ^
  • Modulus or Remainder MOD

Arithmetic operators are shown in descending order of precedence. Parentheses can be used to control the order in which operators are evaluated. The default order, however, frequently achieves the correct result.

While it is possible to do date math with dates considered as a number of days (e.g., IncubationDays = SymptomDateTime – ExposureDateTime), the behavior of the database services underlying Epi Info makes it more efficient to use time interval functions (e.g., IncubationDays = MINUTES(ExposureDateTime, Symptom DateTime)/[24*60]). For doing date math, the following rules apply:

Date + Date produces Date
Date – Date produces Days
Date * Date not permitted
Date / Date not permitted
Date ^ Date not permitted
Date + Number produces Date
Number + Date produces Number
The last two rules apply as well to other math operations: -, *, /, ^
The “zero day” for date math is December 30, 1899.

Example

READ {.ProjectsSampleSample.prj}:Surveillance  
DEFINE var1 NUMERIC 
ASSIGN var1=1250 MOD 100 
DEFINE var2 NUMERIC 
ASSIGN var2=1+1 
DEFINE var3 NUMERIC 
ASSIGN var3=2-1 
DEFINE var4 NUMERIC 
ASSIGN var4=1*1 
DEFINE var5 NUMERIC 
ASSIGN var5=8/4 
DEFINE var6 NUMERIC 
ASSIGN var6=5^2 
LIST var1 var2 var3 var4 var5 var6

Comparisons

Description
These comparison operators can be used in If, Then, and Select statements in Check Code and Analysis programs. Yes/No variables can only be tested for equality against other Yes/No constants (+), (-), and (.).

Operator

Description

= Equal to Comparison operator used for equal to; the result of comparison operators is usually a logical value, either True or False. EX. A1 = B1.
> Greater than comparison operator. Compares a value greater than another value; the result of comparison operators is usually a logical value, either True or False. Comparison operator used for comparing a value greater than another value; the result of comparison operators is usually a logical value, either True or False. EX. A1 > B1.
< Less than comparison operator. Compares a value less than another value; the result of comparison operators is usually a logical value, either True or False. Comparison operator used for comparing a value less than another value; the result of comparison operators is usually a logical value, either True or False. EX. A1
>= Greater than or equal to.
<= Less than or equal to.
<> Not equal to.
LIKE Left side variable matches right side pattern; in pattern, ’*’ matches any number of characters, ’?’ matches any one character.

Syntax
[Expression] [Expression]
[Expression] is any valid expression.

Comments
Comparison operators are executed from left to right. There is no hierarchy of comparison operators. The <> operator can be used only with numeric variables. For non-numeric variables, use NOT.

Example

READ {.ProjectsSampleSample.prj}:Surveillance  
SELECT Age>20 LIST Age Disease 
READ {.ProjectsSampleSample.prj}:Surveillance  
SELECT Age<45 LIST Age Disease 
READ {.ProjectsSampleSample.prj}:Surveillance 
SELECT Age>=38 LIST Age Disease 
READ {.ProjectsSampleSample.prj}:Surveillance  
SELECT Age<>77 LIST Age Disease 

Which operator is used to check values within a specified range?

Determines whether the value of an expression falls within a specified range of values. You can use this operator within SQL statements.

Which logical operator can be used to determine whether a specific?

The SQL Like is a logical operator that is used to determine whether a specific character string matches a specified pattern. It is commonly used in a Where clause to search for a specified pattern in a column.

What are the 4 logical operators?

The operators include: > , < , >= , <= , === , and !== . Logical operators — operators that combine multiple boolean expressions or values and provide a single boolean output. The operators include: && , || , and ! .

What are the 5 logical operators?

There are five logical operator symbols: tilde, dot, wedge, horseshoe, and triple bar.