Opening Results in an Existing DB2 Table

 

DB2 Web Query allows you to export your query results to a DB2 table, so you can work with your results in your DB2 database. You can add your query results to an existing DB2 table, or you can create a new DB2 table containing your results.

To add results to an existing DB2 table:

1.         In the desired connection branch of the DB2 Web Query navigation tree, click Results.

The Results branch expands, listing Recent and Saved results sets.

2.         Select the results set that you want to open.

A drop-down menu appears.

3.         From the drop-down menu, select Open.

The Select Output page appears.

4.         Select DB2 Table, and click Options.

The Tables page appears.

5.         In the Commit Scope field, enter the commit scope.

6.         From the list of existing tables, select the table to which you want to add the results set, and click Next.

The Table Definition page appears, and displays the following column information for the existing table:

Name

Specifies the name of the column.

Type

Specifies the type of data which populates the column, such as integer or decimal.

L,P

Specifies the maximum allowable length and precision of the data in the column, where applicable. The length indicates how many integer places the data may have; the precision indicates how many decimal places the data may have. For example, a length and precision specified as 10,2 results in a maximum number of 10 integer places, and 2 decimal places.

7.         In the From column, match the results set column with the table column to which you want to export your data.

Tip:     The commit scope is the number of actions that are performed on the table before the changes are committed to the database. For example, if you enter a commit scope value of 50, after 50 actions are performed on the table, all changes are committed to the database.

8.         Select an import action. To add your results set to the current data in the table, select Append Data. To replace the current data in the table, select Replace Data.

9.         Click Next.

DB2 Web Query adds the results set to the existing table, using the options you specified, and displays a confirmation message.