Export (0) Print
Expand All

Diagram Pane

The Diagram pane presents a graphic display of the tables or table-structured objects you have selected from the data connection. It also shows any join relationships among them.

In the Diagram pane you can:

  • Add or remove tables and table-structured objects and specify data columns for output.
  • Specify columns for ordering the query.
  • Specify that you want to group rows in the result set.
  • Create or modify joins between tables and table-structured objects.

When you make a change in the Diagram pane, the Grid pane and SQL pane are updated to reflect your change. For example, if you select a column for output in a table or table-structured object window in the Diagram pane, the Query and View Designer adds the data column to the Grid pane and to the SQL statement in the SQL pane.

About the Diagram Pane

Each table or table-structured object appears as a separate window in the Diagram pane. The icon in the title bar of each rectangle indicates what type of object the rectangle represents, as illustrated in the following table.

Icon Object type
Table
Query or View
Linked Table
User-Defined Function
Subquery (in FROM clause)
Linked View
Note   If you are working with an Oracle database, you can also use synonyms as table-structured objects. For details, see Query and View Designer Considerations for Oracle Databases.

Each rectangle shows the data columns for the table or table-structured object. Check boxes and symbols appear next to the names of columns to indicate how the columns are used in the query. ToolTips display information such as data type and size for columns.

The following table lists the check boxes and symbols used in the rectangle for each table or table-structured object.

Check box or symbol Description



Specifies whether a data column appears in the query result set (Select query) or is used in an Update, Insert From, Make Table, or Insert Into query. Select the column to add it to the results. If (All Columns) is selected, all data columns appear in the output.
Note   Oracle does not permit you to combine the "*" operator with individual column names. For details, see Query and View Designer Considerations for Oracle Databases.

The icon used with the check box changes according to the type of query you are creating. When creating a Delete query, you cannot select individual columns.


Indicates that the data column is being used to order the query results (is part of an ORDER BY clause). The icon appears as A-Z if the sort order is ascending or Z-A if sort order is descending.
Indicates that the data column is being used to create a grouped result set (is part of a GROUP BY clause) in an aggregate query.
Indicates that the data column is included in a search condition for the query (is part of a WHERE or HAVING clause).
Indicates that the contents of the data column are being summarized for output (are included in a SUM, AVG, or other aggregate function).
Note   The Query and View Designer will not display data columns for a table or table-structured object if you do not have sufficient access rights to it or if the database driver cannot return information about it. In such cases, the Query and View Designer displays only a title bar for the table or table-structured object.

Joined Tables on the Diagram Pane

If the query involves a join, a join line appears between the data columns involved in the join. If the joined data columns are not displayed (for example, the table or table-structured object window is minimized or the join involves an expression), the Query and View Designer places the join line in the title bar of the rectangle representing the table or table-structured object. The Query and View Designer displays one join line for each join condition.

The shape of the icon in the middle of the join line indicates how the tables or table-structured objects are joined. If the join clause uses an operator other than equal (=), the operator is displayed in the join line icon. The following table lists the icons that can be displayed in a join line.

Join line icon Description
Inner join (created using equal sign).
Inner join based on the "greater than" operator. (The operator displayed in the join line icon reflects the operator used in the join.)
Outer join in which all rows from the table represented on the left will be included, even if they do not have matches in the related table.
Outer join in which all rows from the table represented on the right will be included, even if they do not have matches in the related table.
A full outer join in which all rows from both tables will be included, even if they do not have matches in the related table.
Note   Oracle databases do not support full outer joins. For details, see Query and View Designer Considerations for Oracle Databases.

Icons on the ends of the join line indicate the type of join. The following table lists the types of joins and the icons that can be displayed on the ends of the join line.

Icon on ends of join line Description
One-to-one join
One-to-many join
Query and View Designer cannot determine join type

See Also

Adding Tables | Creating a Query | Designing Queries | Grid Pane | Grouping Rows in Query Results | Removing Columns from Query Output | Removing Tables | Removing Joins | Results Pane | SQL Pane

Show:
© 2014 Microsoft