When you create a query, you are retrieving data from or modifying an input source: one or more tables or views. To work with input sources in your query, you add them to the Diagram pane.
Note For information about adding tables from different data sources while working with SQL Server, see Query Designer Considerations for SQL Server Databases.
To add a table or view to the query
The Query Designer opens, and if it is not already open, the Data View window opens.
Note If you are working with an Oracle database, you can also use synonyms as input sources. For details, see Query Designer Considerations for Oracle Databases.
The Query Designer updates the SQL pane with a skeleton Select query.
If you drag an individual data column into the Diagram pane, the column is added to the query for output. If the table from which you drag the column has not already been added, the Query Designer adds the table with the specified column selected as an input source to the query.
Note You can add tables or views only from the data connection you are working with, even though other data connections are visible in the Project Explorer.
You can also drag columns or tables from the Database Designer or paste them from the Clipboard. For information about using the Database Designer, see Working in Database Diagrams.
Tables and views are automatically added to the query when you reference them in the statement in the SQL pane.
The Query Designer will not display data columns for an input source if you do not have sufficient access rights to the input source or if the ODBC driver cannot return information about an input source you are using (for example, if no such table currently exists). In such cases, only a title bar is displayed for the input source window and the * (All Columns) check box.