Search Results as_territory_values




Overview

AS_TERRITORY_VALUES is a Sales Foundation (AS) view that exposes territory value definitions maintained by Oracle's Territory Manager. It is documented in the ETRM reference material for releases 12.1.1 and 12.2.2 as Obsolete. Territory values (multi-org), and the ETRM metadata explicitly records its implementation status as "Not implemented in this database." Consequently, the object should be treated as a legacy, non-functional view rather than a supported reporting interface in a current 12.1.1 or 12.2.2 environment. Its historical purpose was to present the multi-organization filtered slice of territory values — the combination of qualification criteria (qualifiers and their low/high value ranges) that determine which customers, addresses, items, or other entities are assigned to a given territory.

A territory value row binds a qualifier to a specific match condition. Because territories in Sales Foundation are frequently defined and reused across operating units, the underlying storage is an _ALL table and the view applies an operating unit filter through the CLIENT_INFO session value, allowing the same territory definition to resolve to organization-specific values. The presence of ORG_ID as a column and in the WHERE clause confirms this multi-org design intent.

Underlying Base Objects

Per the supplied metadata, no base objects are separately documented for this view; the view text itself names AS_TERRITORY_VALUES_ALL as its sole source. The view definition is a straight projection of every column from AS_TERRITORY_VALUES_ALL, with a multi-org predicate applied. That predicate compares NVL(ORG_ID, ...) against the operating unit derived from USERENV('CLIENT_INFO'), defaulting unmatched values to -99. In effect, AS_TERRITORY_VALUES is a filtered wrapper over the _ALL table and contains no aggregation, join, or computed business column.

Because the ETRM metadata states the object is obsolete and not implemented, the _ALL table may be absent or unsupported in later patch levels. Readers should verify existence against the specific instance's data dictionary before relying on either name.

Key Columns

Common Use Cases and Queries

Historically, this view supported reporting on territory qualification rules and diagnostics of territory assignment. Typical access filters by territory and qualifier, as shown below.

  • Retrieve all qualifiers for a territory:
    SELECT territory_value_id, seeded_qualifier_id, low_value_char, high_value_char FROM as_territory_values WHERE territory_id = :p_territory_id;
  • Trace a specific qualifier's ranges across territories:
    SELECT territory_id, low_value_number, high_value_number FROM as_territory_values WHERE seeded_qualifier_id = :p_qualifier_id;
  • Identify rollup relationships:
    SELECT territory_id, rollup_territory_id FROM as_territory_values WHERE rollup_territory_id IS NOT NULL;

Given the documented obsolescence, any query should be validated against the target instance, and migration to supported territory-related objects should be considered for 12.1.1 and 12.2.2 implementations.