View or edit SQL for a view

At any time during the process or creating the view, you can view the SQL that has been generated. To view the SQL:

  1. Click Show SQL.
  2. On the Show SQL dialog, you can view the SQL that has been generated for your view.
  3. You can also check the syntax of your SQL by clicking Check Syntax. System i Navigator checks your SQL syntax for errors. If any are found, System i Navigator returns an error screen explaining the cause and possible recovery action that you might take to fix your SQL statement.

To edit the SQL:

  1. Click Edit SQL.
  2. On the Edit SQL dialog, you can make changes to the SQL that has been generated for your view.
  3. To send the generated SQL to the system for processing, click Submit.
  4. Click Cancel to exit this dialog without processing the SQL.

Note: Using the Edit SQL dialog provides the ability to quickly create multiple views that use the same tables but are slightly different, for example, using different columns. However, the view name must be changed for each statement submitted, or the statement will be rejected by the system because the view already exists. Setting column headings and descriptions is successful only for the first view created.

You may also:

If you want to do none of these, click OK to create your new view.