Query Builder
Use the Query Builder dialog box to create a query for use in the Execute SQL task, the OLE DB source and the OLE DB destination, and the Lookup transformation.
You can use Query Builder to perform the following tasks:
-
Working with a graphical representation of a query or with SQL commands Query Builder includes a pane that displays your query graphically and a pane that displays the SQL text of your query. You can work in either the graphical pane or the text pane. Query Builder synchronizes the views so that they are always current.
-
Joining related tables If you add more than one table to your query, Query Builder automatically determines how the tables are related and constructs the appropriate join command.
-
Querying or updating databases You can use Query Builder to return data by using Transact-SQL SELECT statements and to create queries that update, add, or delete records in a database.
-
Viewing and editing results immediately You can run your query and work with a recordset in a grid that allows you to scroll through and edit records in the database.
The graphical tools in the Query Builder dialog box let you construct queries using drag-and-drop operations. By default, the Query Builder dialog box constructs SELECT queries, but you can also build INSERT, UPDATE, or DELETE queries. All types of SQL statements can be parsed and run in the Query Builder dialog box. For more information about SQL statements in packages, see Integration Services (SSIS) Queries.
To learn more about the Transact-SQL language and its syntax, see Transact-SQL Reference (Database Engine).
You can also use variables in a query to provide values to an input parameter, to capture values of output parameters, and to store return codes. To learn more about using variables in the queries that packages use, see Execute SQL Task, OLE DB Source, and Integration Services (SSIS) Queries. To learn more about using variables in the Execute SQL Task, see Parameters and Return Codes in the Execute SQL Task and Result Sets in the Execute SQL Task.
The Lookup and Fuzzy lookup transformations can also use variables with parameters and return codes. The information about the OLE DB source applies to these two transformations also.