17.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.

Chapter 8 – Developing SQL stored procedures 253<br />

8.3.5 View the output<br />

The SQL Results view shows the status of running your stored procedure. The Status<br />

column of this view indicates success or failure of the operation. The Operation column<br />

shows the command type or the actual command itself. The Status tab on the right shows<br />

detailed output. In this case, since the stored procedure returns a result set, its<br />

corresponding rows are shown in a separate tab, Result1. This is illustrated in Figure 8.16.<br />

Figure 8.16 – View results of the stored procedure<br />

8.3.6 Edit the procedure<br />

In <strong>Data</strong> <strong>Studio</strong>, a stored procedure can be viewed and edited in the routine editor. To open<br />

a stored procedure in the routine editor, double-click the stored procedure in the <strong>Data</strong><br />

Project Explorer or right-click and select Open as shown in Figure 8.17.<br />

Figure 8.17 – Open an existing stored procedure in the routine editor<br />

The routine editor provides syntax checking and context sensitive semantic help that is<br />

similar to the one in SQL editor that was discussed in Chapter 5. In addition, the routine

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

Saved successfully!

Ooh no, something went wrong!