16.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

186 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>IBM</strong> <strong>Data</strong> <strong>Studio</strong> <strong>for</strong> <strong>DB2</strong><br />

Figure 5.37 – Script2.sql opened in the SQL Builder<br />

The SQL Query Builder provides an easy-to-use interface to create SQL statements. You<br />

can specify which tables will be included in the statement and, from those tables, select the<br />

columns to be returned or used <strong>for</strong> filtering.<br />

Start by following the instructions in the editor to add a table:<br />

1. Right-click in the middle pane and select Add table to select a table from the database.<br />

Select theGOSALES.BRANCH table, which adds this table automatically to your script.<br />

2. Then select the table columns you want to include in your SQLSELECT statement. You<br />

can select the columns directly from the pane that opens when you selected the table.<br />

Select theCITY column, as shown in Figure 5.38.<br />

3. In the Conditions tab, add the value filter by selecting the columnPROV_STATE, the<br />

operator =, and typing in the value‘CA’, as shown in Figure 5.38. When you move<br />

your mouse from this input table, thisWHERE clause is added to the script.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!