Example: Linking Tables

Objective: Get a list of all the projects with all their data sorted by expert names, with client, project manager name and currency names.

1. Drag & drop the PROJECTS, CLIENTS, CURR and AIT$USERS tables to the working area. In the PROJECTS table select “*” field (to display all table fields); select the CLIENT_NAME field in the CLIENTS table, the CURR_NAME field in the CURR table and the AIT$USER_REALNAME field in the AIT$USERS table.

 

 

2. In order to get the name of the client the project is assigned to, you need to set up a connection between the PROJECTS and CLIENTS tables by the unique field CLIENT_ID: click and hold the left mouse button on the CLIENT_ID field in the PROJECTS field, drag it to the CLIENT_ID field in the CLIENTS table, and release the button. Similarly you need to connect the tables CLIENTS and CURR by the unique CURR_ID field, the PROJ_PM field of the PROJECTS table and the AIT$USER_ID field of the AIT$USERS table. As a result you get the following:

 

 

 

3. After the request model has been created, click the Generate Query button. The SQL code of the request will be generated and displayed in the Content field on the Query tab.

4. You can view the results by clicking the Run Query button: you will get a table with a list of all the projects and their data including service data.

 

 

5. To save the request model switch to the Query tab, specify the query name and description (optionally) and click OK button.

Note: You can export or print this data from the Queries tab of the Server Administrator Corporate Settings (using the Export Data and Print Data buttons) (the query should be saved as described in the previous paragraph).

 

 

See also:

Query Building Tutorial