A script-enabled browser is required for this page to function properly.

WHERE Clause/ORDER BY Clause Properties

Description

The default WHERE Clause and default ORDER BY Clause properties specify standard SQL clauses for the default SELECT statement associated with a data block. These clauses are automatically appended to the SELECT statement that Oracle Forms constructs and issues whenever the operator or the application executes a query in the block.

Applies to block

Set Oracle Forms, programmatically

Refer to Built-in

GET BLOCK PROPERTY

SET BLOCK PROPERTY

Required/Optional optional

Usage Notes

  1. The reserved words WHERE and ORDER BY are optional. If you do not include them, Oracle Forms automatically prefixes the statement with these words.
  2. WHERE Clause can reference the following objects:
    columns in the block's data block table (except LONG columns)
    form parameters (:PARAMETER.my parameter)
  3. ORDER BY Clause can reference the following objects:
    columns in the block's data block table (except LONG columns)
  4. Embedded comments are not supported in WHERE Clause and ORDER BY Clause.

WHERE Clause/ORDER BY Clause Restrictions

WHERE Clause/ORDER BY Clause Examples

Example

In the following example from an order tracking system, the WHERE Clause limits the retrieved records to those whose shipdate column is NULL. The ORDER BY Clause arranges the selected records from the lowest (earliest) date to the highest (latest) date.

WHERE shipdate IS NULL
ORDER BY orderdate

This WHERE Clause/ORDER BY Clause statement specifies the base conditions for record retrieval. The operator can further restrict the records retrieved by placing the form in Enter Query mode and entering ad hoc query conditions.