SQL Area

The SQL area, or SQL editor, enables you to view and modify the SQL code for your dataset by clicking the Edit SQL button. Before going into SQL mode, you must save the dataset in graphical mode.

You can work between the Transforms area and the SQL area. If you created the dataset using the transforms, you can then manually create a more sophisticated definition for your dataset by using the SQL area.

SQL Mode Usage Tips

Use the following guidelines when defining a dataset in SQL mode:

  • Save your dataset before using the Edit SQL button.
  • You can use the DataSet Source and Derive New Attributes icons in the Transforms area to change the attributes in your datasets.
  • Use all features of the SQL language, including advanced SQL clauses in the editor such as union, group by, having, and exists or not exists.
  • The system does not validate modified SQL code so you must ensure that SQL code you specify is accurate and error-free.
  • You must ensure that you define all datasets and attributes in graphical mode that you are using in SQL mode. Also ensure that definitions that you create in SQL mode override definitions in graphical mode.
  • The text DSVIEWxxx (that is, dataset name) must appear only in the SQL text area where you intend to use it. This text should not appear in a comment in the SQL area.

For other tips and guidelines, see Scenario Design Guidelines.