Progress
Results Administration
and Development Guide
Table Aliases
A table alias is another name for an existing table in a Results database. Table aliases allow you to perform self-join operations. A self-join is when you join a table to itself. For example, the demonstration sports database contains an Item table. Each record in the Item table describes a particular product in a warehouse. You can define an additional field in the Item table to store the item number of a substitute for each item. Once you create the preconditions for the self-join in the schema, you can establish an alias in Results for the Item table called Sub–Item and then join Items with Sub–Items in a Results query.
Choose Query
Site Admin
Table Aliases to display the Table Alias dialog box and define an alias for a table:
![]()
The Table Alias dialog box contains the following user-interface elements:
Name
Specifies the alias for the selected table.
Tables
Lists the names of all tables available to your user ID in Results from the connected databases.
Aliases
Lists the names of existing aliases. When you select an alias from the list, Results highlights the associated table.
Relationship Buttons
These buttons perform the following actions:
- Add — Adds the specified alias in the Name field to the Aliases selection list.
- Remove — Removes the currently selected alias.
- Relate Alias to Table — Specifies whether to create a self-join relationship between the alias and the selected table. This option is activated by default.
- Copy Relationships — Specifies whether the existing table relationships of the selected table also become the defined relationships for the alias. This option is activated by default.
Follow these steps to create a new alias for a table:
- Type the name of a new alias in the Name field. The alias name must be unique among all table names and other alias names.
- Select a table from the Tables list to associate with the new alias.
- If desired, deactivate the Relate Alias to Table toggle box. This option is activated by default.
- If desired, deactivate the Copy Relationships toggle box. This option is activated by default.
- Choose the Add button to create the alias. The new alias appears in the Aliases list.
Results stores alias definitions in the current QC7 file when you choose the OK button and close the Table Alias dialog box.
You can create several aliases for a single table, but you cannot create an alias for an alias. Once you define an alias for a table, the alias appears as a table in every table listing in Results, and you can create queries that use the alias. To restrict user access to the alias, choose Query
Site Admin
Table Data Selection. If you remove an alias that is used in a query, the query will no longer work. If you delete a table, all associated aliases are also deleted.
For more information about restricting user access to tables and aliases, see the "Table Data Selection" section later in this chapter.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |