Defining Table Aliases

Aliases are alternate names that can make cryptic table names clearer. For example, you could change a table name such as EMP to EMPLOYEES.

*  To define a table alias:

  1. Select a table on the Query Builder - Tables page (see Selecting Tables).

    • Click the table under Selected Tables and click Edit button.

    • Right-click the table under Selected Tables and select Edit.

    • Double-click the table under Selected Tables.

  2. In the Define Table Alias dialog box, enter an alias for the table and click OK.

    The table alias is displayed under Selected Tables with the original table name to the right. For example, EMPLOYEES (EMP).

    To delete a table alias, right-click the table and select Delete Alias.

    Note:

    When a table name is aliased, you must update any reference to the original table name. SQR Production Reporting Studio updates column references in the Select clause, as well as much of the From clause. However, you must update any variables and subqueries in the Where Clause that refer to the original table name. If these references are not updated, the SQL syntax will not be correct.