Creating SQL statements in the SQL editor by using the Database Explorer toolbar

You can use the Database Explorer toolbar to create an SQL statement in the SQL editor.

The SQL editor supports any statement that can be run by the database to which you are connected. If you save the SQL statement, it is stored in a file with the extension .sql.

Prerequisites: If you want to save the SQL statement, create the project in which to store the statement.

Restriction:
  • If you want to reopen the SQL statement in the SQL editor or the SQL builder, save the statement in a data project. The data project can be a data development project or a data design project.
  • If you save the SQL statement in a data development project, the project must be associated with a database that contains the database tables that you use in the statement. Otherwise, you cannot run the statement successfully.

To create an SQL statement in the SQL editor by using the Database Explorer toolbar:

  1. Open the Data perspective.
  2. In the Database Explorer view, click the Open SQL Editor toolbar button.
  3. Specify the SQL statement in the SQL editor, and then save the statement.
  4. In the Save As window, provide the information about the SQL statement:
    1. Select the project in which to save the SQL statement. If you select a data development project or a data design project, the SQL statement is added to the SQL Scripts folder of the selected project.
    2. Type a file name for the statement.
    3. Click OK
Related concepts
SQL editor
Related tasks
Changing the SQL statement terminator
Using database connections in the SQL editor

Feedback