Follow the steps below to perform a SQL SELECT statement within a Project.
From within the Project Designer page, expand the Database folder in the Component Library, and then drag the SQL task to the Project Outline.
On the Basic tab of the SQL task, select the database server resource from the drop-down list. If not already defined, click the
Create
button to define a new database server resource.
Click the
Add
button to Add a Query to the SQL task.
Type in your SQL Select Statement on the page. Alternatively, you can use the
SQL Wizard for quickly building the Select statement. With the SQL wizard, you can choose schemas (libraries), tables (physical files), columns (fields), column headings, "where" criteria and "order by" criteria. To access the SQL Wizard for building a SELECT statement, click the
icon on the right side of the SQL Statement field.
Specify the Output Variable name, which will contain the data as type
RowSet from the Select Statement's results. Click the
Next
button to add any additional tasks to work with the data in the Output Variable. For instance, you may want to use the Output Variable as the input into other tasks such as the
Write CSV,
Write Excel,
Write Fixed-width or
Write XML tasks.
You must have Use permission to the Database Resource in order to execute the Project.