SQL Tab

Use the SQL tab to view a generated SQL query or to specify your own query.

This tab displays the stage-generated or user-defined SQL statements used to read data from OLE DB. It contains the Generated, User-defined, Before, and After tabs, which are the same as those for the Input page under the SQL tab.

  • Generated. This contains the SQL statements constructed by IBM® InfoSphere® DataStage® as a result of the Output action from the General tab of the Output page. You cannot edit these statements, but you can use Copy to copy them to the Clipboard for use elsewhere.
  • User-defined. This tab is displayed by default. It contains the SQL statements executed to read data from the data source. The GUI displays the stage-generated SQL statement on this tab as a starting point. However, you can enter any valid, appropriate SQL statement. The box size changes proportionately when you resize the main window to display long SQL statements.
  • Before. This tab contains the SQL statements executed before the stage processes any job data rows. Use a semicolon ( ; ) to separate multiple BeforeSQL statements. The SQL statement is entered in a resizable edit box. Execution occurs immediately after a successful data source connection. The Before and After tabs look alike.
  • After. This tab contains the SQL statements executed after the stage processes any job data rows. Use a semicolon ( ; ) to separate multiple AfterSQL statements. The SQL statement is entered in a resizable edit box. Execution occurs immediately after the last row is processed, before the data source connection is terminated. The Before and After tabs look alike.