WHERE

Controls the evaluation of other expressions.

Syntax

expression1 WHERE expression2

Parameters

expression1

A value expression.

expression2

A logic expression using conditional and Boolean operators.

Return Value

If expression2 is logically true, the value of expression1; otherwise, $Null.

Example

let i = { 1 where Age < 10, \
   2 where Age between 10 and 30, \
   4 where Age > 50, 3 }

Assigns a value to the variable i based on Age.

compute Employees evaluate \
  (let TotSal = $total(Salary where LastName = "Smith")

Finds the total of the salaries of all employees named Smith.

 

Related Topics