In this topic you will learn how to create a query that combines fields from three tables/records (Personal_Data, Job and Jobcode) using the two predefined joins Record Hierarchy join and a Related Record join.
In Query, predefined joins can be generated as a Related Record join. Since these types of joins are predefined, you will not have to add any criteria to manually link the records.
Any Joins gives you the ability to join any record, that you may access, to your currently selected record. Records will be joined on their common high-level keys. If you have an Any Join, it will automatically be added to your criteria, unless there is only one row of data in the record to be joined.
Steps:
Click the Main Menu button.
Step 1Point to the Reporting Tools menu.
Step 2Point to the Query menu.
Step 3Click the Query Manager menu.
Step 4Click the Create New Query link.
Step 5Enter the desired information into the begins with field. Enter "personal".
Step 6Click the Search button.
Step 7Click the Add Record link for the Personal_DATA record.
Step 8Note: Query displays a letter in front of each record or table. This letter is an alias that represents the record or table. When joining records or tables, Query assigns subsequent letters.
Click the checkbox EMPLID.
Step 9Click the checkbox for NAME.
Step 10Note: This is a Any join.
Click the Records tab.
Step 11Enter the desired information into the begins with field. Enter
Click the Search button.
Step 13Click Join Record for the JOB - EE Job History.
Step 14Click the A = PERSONAL_DATA - PERSONAL_DATA for Rpting link.
Step 15Note: The Query tool has detected alike fields in both queries. Always select Add Criteria on this screen.
Click the Add Criteria button.
Step 16Click the OK button.
Step 17Click the checkbox for DEPTID.
Step 18Click the checkbox for JOBCODE.
Step 19Click the Join JOBCODE_TBL - Job Codes link.
Note: This is a Related Record join.
Step 20Click the OK button.
Step 21Click the OK button.
Step 22Click the checkbox for DESCR.
Step 23Click the Fields tab.
Step 24Note: Query displays a letter in front of each field. This letter is an alias that represents the record or table from which the field was pulled. When joining records or tables, Query assigns subsequent letters.
Click the Save As link.
Step 25Enter the desired information into the Query field. Enter
Enter the desired information into the Description field. Enter
Click the OK button.
Step 28Click the Run tab.
Step 29