0 / 0
Before SQL

Before SQL

Use this property to specify the SQL statement that is parsed and run once per job before any processing occurs.

This property is available only if you set Before/After SQL to Yes.

If you set Table action to Append, you cannot specify a CREATE TABLE statement in this property because the destination table must already exist.

You can type more than one statement in this property. Separate each statement with a semicolon (;). Use the Fail on error property to specify whether the job stops when an error occurs.

To specify that this SQL statement is run once on each node or logical processor, use the Before SQL (node) property instead of this property.

Click ellipses button to open a statement window in which to type your SQL statement. This button is available only when you click inside the property.

You must include a CREATE INDEX statement as part of this statement if all of the following statements are true:
  • You are using an IBM® Db2® database on the mainframe.
  • Your table contains primary keys or unique columns.
If you do not include the CREATE INDEX statement, a table is created if set Table action to Create or Replace. However, if you try to insert data into that table, an error message is generated and the job fails.

Valid values for Before SQL are determined by the specific database.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more