Using Generated SQL Statements

About this task

By default, the IBM® InfoSphere® DataStage® writes data to a data source by using an SQL INSERT, DELETE, or UPDATE statement that it constructs. The generated SQL statement is automatically constructed by using the InfoSphere DataStage table and column definitions that you specify in the input properties for this stage. The Generated tab on the SQL tab displays the SQL statement used to write the data.

To use a generated statement:

Procedure

  1. Enter a table name in the Table name field on the General tab of the Input page.
  2. Specify how you want the data to be written by choosing an option from the Input action list box. See ""General Tab of the Input Page" for a description of the input actions.
  3. Optional. Enter a description of the input link in the Description field.
  4. Click the Columns tab on the Input page.
  5. Edit the Columns grid to specify the column definitions for the columns you want to write. The SQL statement is automatically constructed by using your chosen input action and the columns you have specified. You can now optionally view this SQL statement.
  6. Click the SQL tab on the Input page, then the Generated tab to view this SQL statement. You cannot edit the statement here, but you can always access this tab to select and copy parts of the generated statement to paste into the user-defined SQL statement.
  7. Click OK to close this dialog box. Changes are saved when you save your job design.