The tool supports interface of Foresight Analytics Platform 9 or earlier.
The SQL Command dialog box can be opened on creating or editing an SQL command.
Set up SQL command parameters:
Name. Sets SQL command name. SQL Command is used by default.
Use Another Connection.If the checkbox is selected, a box for selecting a database from the repository becomes available. On selecting the database, the driver specified in the settings of the selected database is set automatically in the Driver box. Click the button to clear the box. During the update, the SQL command will be executed in the specified connection in accordance with the database settings.
Driver. When an SQL command is created or edited, a driver is indicated in the box. This driver should correspond to the settings of the current repository where the update is created or opened. If another connection is used for the command, the driver is indicated in accordance with settings of the specified database. Select the DBMS type in the drop-down list. For details about available DBMS see the Supported DBMS section.
SQL Command. Write the command text in the box. One can use tooltips with keywords (SELECT, DROP, ALTER) and repository objects or objects of a database specified in another connection. In the text of a command one can use:
Brackets "Begin…end;". One can specify several SQL expressions within the brackets. To separate SQL expression within the brackets, use a semicolon. SQL command example:
begin
delete from OBJ32305 where Field2=78;
insert into OBJ32305 values('Moscow', 56,13);
end;
The / character is used to separate several SQL expressions. A separator must be the only symbol in a row. SQL command example:
delete from OBJ32305 where Field2=78
/
insert into OBJ32305 values('Moscow', 56,13)
The ; character is used to separate several SQL expressions. The separator is placed at the end of an SQL expression. SQL command example:
delete from OBJ32305 where Field2=78;
insert into OBJ32305 values('Moscow', 56,13)
Command text is automatically saved for the selected driver. Text can be specified for each driver. The text, which was previously set for the driver, is displayed when the driver is changed.
NOTE. Separate use of the semicolon separator is denied for Oracle drivers. It can be used only within the "Begin…end;" brackets.
Skip Errors.Selecting the checkbox enables the user to skip SQL command execution if its execution caused any errors (no error message is displayed), and continue the update starting with the next element. If the checkbox is deselected and an error occurs while executing an SQL command, the update is aborted (an error message is displayed).
Apply for All DBMS. The command is used to set the current text of an SQL command for all DBMS drivers. A confirmation is required to execute the operation.
NOTE. If no text is set for other DBMS drivers, no message is displayed.
The database of the SQL command specified in the connection when the Use Another Connection checkbox is selected may be missing on opening the update. In this case an altered icon is displayed next to the command:
Open command parameters dialog box to check command settings. If parameters of multiple commands need to be checked, it is possible to open the edit dialog box for all selected commands and specify the database. In this case the parameters dialog box looks as follows:
The user needs to select a database in the list of repository objects. The selected database is set for all edited SQL commands.
See also: