Show TOC Start of Content Area

This graphic is explained in the accompanying text Between predicate  Locate the document in its SAP Library structure

The between predicate is used test whether a value is within a given closed value range.

Syntax

This graphic is explained in the accompanying text

<between predicate> ::= <value expression> ( NOT )? BETWEEN <lower bound> AND <upper bound>.

<lower bound> ::= <value expression>
                            | <dynamic parameter specification>

<upper bound>
::= <value expression>
                            | <dynamic parameter specification>

 

The data types of the three <value expression>s in a <between predicate> must be comparable.

The <between predicate> "a NOT BETWEEN b AND c" is equivalent to the <boolean factor> "NOT ( a BETWEEN b AND c )".

The <between predicate> "a BETWEEN b AND c" is equivalent to the <boolean term> "a >= b AND a <= c".

Example

This graphic is explained in the accompanying text

SELECT * FROM a WHERE c BETWEEN 1 AND 100

BETWEEN PREDICATE. This SELECT yields all rows from table a where the value of the column a.c is greater or equal to 1 and lower or equal to 100.

More Information

Value expressions

Dynamic Parameter Specification

End of Content Area