Top
Interstage Studio User's Guide
FUJITSU Software

8.3.3 Executing SQL Statements

To issue SQL statements to a database, create an SQL file, then execute that SQL statements.

Creating the SQL File

From the [New] wizard, select [SQL Development] > [SQL File]. Refer below for the contents to specify in the wizard:

Point

An SQL file can be created without selecting a database server type, connection profile name, and database name. However, if these are not set, some editor support functions may not be available.

Editing the SQL File

Use the SQL File editor to open the SQL file. Code SQL statements in the SQL file.
If connected to the database, content assist can be used to enter tables and columns.

Point

Specify a semicolon (;) as the delimiter between SQL statements. For some SQL statements, this delimiter cannot be parsed. In those cases, enter a line feed at the end of the SQL statement and specify a semicolon at the start of the next line. Alternatively, code the SQL statement in one line.

Executing SQL Files

Check the [Connection profile] group shown in the SQL File editor. Check that values are set in the type, name, and database combo boxes and that the database is connected.
From the context menu of the SQL File Editor, select one of the items below. The SQL statement described in the SQL file is executed, and the result is displayed in the [SQL Results] view.

Point

The operation of [Execute Current Text] follows the settings in the workbench settings window, [Data Management] > [SQL Development] > [SQL Editor] under [Execute current text]. The default setting is [Execute current line].

  • Execute SQLs between delimiters
    Executes the SQL between the delimiters before and after where the cursor is currently positioned.

  • Execute current line
    Executes the text in the line where the cursor is positioned.

  • Execute SQLs between blank lines
    Executes the SQL between the blank lines before and after where the cursor is currently positioned.