Join rule


To create more-advanced queries and reports that require data entries from more than one table, you must join the necessary tables together.

For example, EQ_MAIN contains equipment units' department codes, but not department codes' names or addresses; DPT_MAIN contains all detailed department data by department code. To include all the data items on a report, you must join EQ_MAIN to DPT_MAIN. A specification of the column (or columns) to use in order to connect data in one table to data in another table is called a join rule.

Join rules are defined on the Restrictions tab of the Queries/Reports -> Query/Report Generator screen. When you construct a join rule, always specify both the table name and column name for each column you name. The format is:

TABLE_B.column_name = TABLE_A.column_name

The table and column names are not case sensitive. The system, however, always names tables in uppercase characters and columns in lowercase characters (except the first segment of column names, which can be used to join to other tables, and which the system names in uppercase).

For more information, refer to the following join rule examples:

The system database contains two types of objects (parts and work orders) that are identified by more than one value. When you join tables together based on a part number or a work order ID, you must specify multi-column join rules. Examples 3 and 4 demonstrate how to join on part number and work order ID.