Table of Contents

Search

  1. About the Data Vault SQL Reference
  2. Introduction to SQL Reference for Informatica Data Vault
  3. Date and Time Arithmetic
  4. WHERE Clauses
  5. UNION Operator
  6. Parameterized Query
  7. Functions

Data Vault SQL Reference

Data Vault SQL Reference

BETWEEN Predicates

BETWEEN Predicates

The BETWEEN operator can evaluate whether or not data values fall within the range of values indicated in the predicate.
Each occurrence of the expression
x
is evaluated to determine if it sorts between and including the range values indicated by
y
and
z
(the range values in the BETWEEN clause are also part of the result set). The three variables above can consist of any combination of value expressions, although
x
is typically a column name.
Note that the value of
y
should be less than that of
z
. Otherwise, in the case of literals, an error will be returned; in the case of numeric expressions, the predicate will always return FALSE.
The following query selects all Part table records with
weight
column values between 15 and 18:
SELECT pno, pname FROM part WHERE weight BETWEEN 15 AND 18;
The following table displays the records retrieved:
pno
pname
P2
BOLT

0 COMMENTS

We’d like to hear from you!