Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Database Access : Sequences : Accessing and incrementing sequences : Referencing sequences within a WHERE clause
Referencing sequences within a WHERE clause
You cannot invoke sequence functions from within a WHERE clause. This generates a compiler error, because sequence expressions do not participate in the index resolution and optimization phase of the Compiler.
If you want to use a sequence value within a WHERE clause, set a variable or field to the sequence value, and reference the variable or field in your WHERE clause. See the sections that describe each sequence function for examples.