Schemas for Owner Qualification
A schema is a collection of database objects, such as tables. Each table, view, or synonym belongs to a schema that is determined when the object is created. The schema name corresponds to the user who owns the object. The schema name helps distinguish between objects with identical names and different owners.
In report specifications containing a SQL .query or .data statement, you can qualify a table name, view name, or synonym by specifying the schema to which it belongs (which also implies its owner), using the following construct:
schema.objectname
This allows you to access a table, view, or synonym owned by a user other than yourself or the DBA, if you have the correct permissions to access it.
A period (.) must immediately follow the schema name, although white space following the period is allowed. For example, Report-Writer allows the following construction:
schema. objectname
Both the schema name and the object name (table name, view name, or synonym) can be variables or delimited identifiers. A schema.objectname construct in which both the schema and table name are variables would take the form:
$schema.$objectname
A schema.objectname construct in which both the schema and object name are delimited identifiers would take the form:
"schema name"."object name"
A separate set of double quotes must surround each delimited identifier. For more information on delimited identifiers and variable substitution, see the chapter “Report-Writer Expressions and Formats.”
You can use the schema.objectname qualification within the following statements:
.cleanup
.data
.declare (in the with value string)
.query (SQL only)
.setup
If you do not qualify the table, view, or synonym with a schema, Report-Writer searches for the specified object in the following order:
1. Objects owned by the current user.
2. Objects owned by the DBA to which you have been granted access.
3. Objects in the system catalogs.
QUEL User Notes
If you are a QUEL user, you cannot use schemas or owner qualification for a table name, view name, or synonym in a report specification that contains a QUEL query. If you use the schema.objectname construct in reports with QUEL queries, Ingres tries to interpret the construct as a Report-Writer statement, which generates a runtime error.
Last modified date: 04/03/2024