FROM


FROM specifies the table or view from which UNLOAD PLUS unloads data.
FROM.png

Related topic

You can specify only one table or view name. If you do not specify the creator name, UNLOAD PLUS uses the Db2 primary authorization ID of the user executing UNLOAD PLUS. The table name or view name can be an alias or a synonym.

Restrictions

Note the following restrictions when specifying FROM:

  • UNLOAD PLUS does not support the following specifications:
    • Three-part object names
    • Correlation names
    • Unicode table names
  • You cannot specify an auxiliary or XML table. (To unload LOB or XML data, specify the base table.)
  • When you specify the FORMAT BMCLOAD option, you cannot specify a catalog table.
  • UNLOAD PLUS supports unloading from clone tables. However, you cannot unload from a clone table and a base table in the same unload job step.
  • With DIRECT YES, UNLOAD PLUS supports unloading from views except for the following definitions:

    • Views that you created with the keyword DISTINCT in the subselect
    • Views that you created with a WHERE clause in the subselect
    • Views that you created with a GROUP BY clause in the subselect
    • Views that you created with a HAVING clause in the subselect
    • View columns derived from functions or expressions
    • Views that you created with a join in the view subselect
    • Views that you created with a union in the view fullselect

    Important

    DIRECT NO supports the full range of Db2 SQL SELECT functionality and view definitions.

  • Only the authorization ID that created an unqualified synonym can access it.

OBID

The OBID option specifies the OBID that UNLOAD PLUS can use to find the rows for the selected table when unloading using the INFILE ddname option. Normally, UNLOAD PLUS uses the OBID found in the Db2 catalog for the selected table to find the rows. This option allows you to override the OBID that UNLOAD PLUS finds in the DB2 catalog. This option is useful when the OBID in the Db2 catalog for the selected table no longer matches the OBID that is associated with the table as it exists in the image copy. This option is valid only when you specify the INFILE ddname option.

You can specify the OBID option when selecting data from tables or views. When UNLOAD PLUS uses the specified OBID with a view, the specified OBID overrides the OBID that UNLOAD PLUS found in the Db2 catalog for the 'viewed' table. You can specify the OBID as an integer or as a hexadecimal string, and you must use either parentheses or braces.

To specify the OBID, you must either use this option or specify the OBID in the DDL that the DDLIN data set provides.

When the following conditions exists, you must either specify this option (with each SELECT statement) or specify the OBID in each CREATE TABLE statement in the DDLIN data set:

  • You specify INFILE ddname with DDL (using a DDLIN data set).
  • You are either specifying multiple SELECT statements or unloading a table space which currently is or previously was a multi-table table space.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*