DB2 Web Query Tool allows you to export your query results to a DB2 table, so you can work with your results in your DB2 database. You can create a new DB2 table containing your query results, or you can add your query results to an existing DB2 table
Fields and controls for the Select Output page
Fields and controls for the Tables page
Fields and controls for the Table Definition page
To open results in a new DB2 table:
1. In the desired connection branch of the DB2 Web Query Tool navigation tree, expand the Data branch of the DB2 Web Query navigation tree. The Temporary and Saved branches of the tree are visible.
2. Expand either the Temporary or Saved branch of the DB2 Web Query navigation tree. Until the results set that you want to open is visible.
3. Click the results set that you want to open. A drop-down menu appears.
4. On the drop-down menu, click Open. The Select Output page opens.
5. Select the DB2 Table radio button.
6. Click Process. The Tables page opens.
7. From the list of existing tables, select New Table.
8. Click Select. The Table Definition page opens, and displays a default table configuration based on the columns and rows of the results set that you specified.
9. In the Creator field, type the name of the table creator.
10. In the Name field, type the name of the table that you want to create.
11. In the Commit Scope field, type the desired commit scope.
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 specify a commit scope of 50, after 50 actions are performed on the table, all changes are committed to the database.
12. In the Create Table In field, type the name of the table space in which you want to create the table.
13. Check the Data Capture for Propigation check box to have extra information regarding SQL changes to this table written to the log. This extra information is required if this table will be replicated using DB2. This check box must be selected if you plan to use this table as a source for replication in DB2.
14. Optional: Add a column to the table by clicking Add Column.
15. Optional: Delete a column from the table by clicking the Select radio button next to the column that you want to delete, then clicking Delete Column.
16. Optional: To move a column up or down in the table, click the Select radio button next to the column that you want to move, then click Up (to move the column up one) or Down (to move the column down one).
17. Specify the table column options:
Name |
Specify the name of the column. By default, the column names match the results set column names. |
Type |
Specify the type of data, which will populate the column, such as integer or decimal. |
L,P |
Specify the maximum allowable length and precision of the data in the column, where applicable. The length indicates how many integer places the data can have; the precision indicates how many decimal places the data can have. For example, a length and precision specified as 10,2 results in a maximum number of 10 integer places, and 2 decimal places. |
Bit Data |
Check the Bit Data check box to indicate that the column contains bit data. |
Nullable |
Check the Nullable check box to indicate that the data in the column is nullable. |
Extra |
Specify any additional DB2-allowable attributes to add to the column definition, such as Not Null, or a default value. |
From |
Match the column in the results set to the column in the new table. By default, the columns in the results set are matched to the columns of the same name in the new table. |
18. Click Create.
DB2 Web Query Tool creates the new table containing the results set that you specified, using the options that you specified, and displays a confirmation message.