SQL Command settings

Previous Next

The following is a list of combinations of setting names and values for SqlScript(). These same settings may also be used in the SQL Command tool.

Syntax

SET setting value

 

The SET command and setting are case-insensitive. Value is case-sensitive.

Example

SET quitZeroRows False

 

Here is a alphabetic list of possible settings:

Setting

Value (case-sensitive)

autoCommit

{ True | False }

If set to True, a commit will be requested after each record manipulation. The default is False.

 

commentBegin

begin-marker  :=  { /* | }

Begin-marker is a non-quoted string that is interpreted as the start of a comment. The default is /* .

commentEnd

end-marker  :=  { */ | }

End-marker is a non-quoted string that is interpreted as the end of a comment. The default is */ .

echoComment

True | False }

If set to True (the default), comments are echoed to the screen.

echoStatement

{ True | False }

If set to True, statements are echoed to the screen before they are executed. The default is False.

gutter

no-of-spaces :=  { 2 | }

No-of-spaces is an integer that is the number of spaces between output columns. The default is 2.

module

module

Module is a non-quoted string. When this property is set, the module context switches to the specified module.

noSqlInMessages

{ True | False }

If set to True, messages fired as a result of the script do not contain SQL statement text. Additional messages that only contain the erroneous SQL statement are not displayed at all. The default is False.

 

You can use the resource setting "*Script*noSqlInMessages: True" to achieve the same effect. Such a resource setting applies to all scripts (unless overruled locally within a script).

outputEncoding

encoding  :=  { ANSI | UTF8 }

If the output goes to a file, encoding specifies the encoding of the output file. Encoding is a non-quoted string. Possible values are ANSI and UTF8.

IMPORTANT: Use "SET outputEncoding" before "SET reportFile" in the script.

quitOnError

True | False }

If set to True (the default), processing will stop as soon as an error is encountered.

quitZeroRows

True | False }

If set to True (the default), processing will stop if a SELECT statement does not retrieve any records.

reportFile

filepath

If this option is specified, the output is written to a file. Filepath is a non-quoted string specifying the filename, or the filepath and filename, of the output file.

This option is useful if the output is larger than 32 KB, which is the maximum that the SQL Command window can display.

rollbackOnError

{ True | False }

If set to True, a rollback is performed when an error occurs. The default is False.

separator

separator-symbol  :=  { ; | }

Separator-symbol is the symbol interpreted as a separator between SQL statements in a script. The default is a semi-colon ( ; ).

showErrorMessages

{ True | False }

If set to True, and showMessages is set to False, then only messages for real errors such as constraint violations are shown. The default is False.

showMessages

{ True | False }

If set to True, messages generated while executing the script will be displayed on the screen. The default is False.

 

See Also

SqlScript()