SQLEXE Command Line Options

You can append command tails to the SQLEXE command line to modify how SQLEXE operates. These are listed in the following table.

Command Tail Meaning

−d number

Uses the ASCII character specified by number as an SQL statement delimiter (this implies −delim ). Normally, this is 59; the ASCII semicolon (;) character

−db dbname

Specifies the database name to use. This is mandatory

−delim

Specifies that SQL statements are delimited by semicolons. This allows you to put several statements on the same line or large statements across several lines. Normally, one statement is expected per line

−e number

Uses the ASCII character specified by number as an error message lead-in. This causes error messages to be sent to stdout instead of stderr, and to be prefixed by the specified character

−echo

Echoes the SQL statement to the output. This is useful for storing the statement with its results

−f number

Uses the ASCII character specified by number as a tab character (this implies −tabs ). Normally, this is 9; the standard ASCII tab character

−go_faster

Turns off referential checking, such as parent checks. This also turns off the private database.

−names_as_headings

Uses column names as column headings

−no_fail

Does not terminate on SQL error. This allows you to execute further SQL statements in the file when a statement generates an SQL error

−no_headings

Produces output without column headings

−no_private

Turns off the private database facility, without disabling referential checking. This may speed up large inserts,updates, and deletes or selects done after these operations but prior to a commit or rollback work. Wrong results may be returned to a select in as much as uncommitted changes will not be seen by the program if records are read more than once in the same transaction.

−read filename

Input statements are read from this file rather than stdin. This command tail is supplied to allow sqlexe to be invoked without the need for input redirection (for example from Windows short-cuts, which do not support command line redirection.)

−read_only

Allows only SELECT statements

−tabs

Uses tabs as column separators. Normally, blanks are used as column separators

−trigraph

Interprets trigraph sequences in the input (such as ??q for a quote character and so on)

−write filename

Results are written to this file rather than stdout. This command tail is supplied to allow sqlexe to be invoked without the need for output redirection (for example from Windows short-cuts, which do not support command line redirection). −file can be used as a synonym for −write.