sql utility

This is a command line utility which can execute SQL statements. Any result sets are emitted as text on standard output. It is intended as a diagnostic tool for the kiodbc server.

The SQL statement is the last argument on the line and should be quoted. You can also put it in a file referenced by the -y switch.

If no KCML_SOURCES environment variable is defined the utility will look for the database sources file in the directory where its binary is executed (usually /usr/local/kcml on Unix systems).

Example:

sql -d BENCH "SELECT * FROM DATA1"
SwitchPurpose
-c dirChange directory
-C TableNameDisplay column information for the given table
-d dbaseUse specified database
-f FileNameTake SQL from the file
-hHTML output
-I TableNameColumn information for given table
-k LibraryNameSpecifies the location of an application callback library for use with Oracle/PostGreSQL databases
-l numWork in specified lang. The number is that used in $OPTIONS RUN byte 20
-n xsl_urlUse given URL in XML output
-o levelSet optimization level
-PParse only
-qCreate a ODBC_RW filename
-rNT register
-RUse Rev8 filenames
-sUse short column names
-t levelSet tracing level
-T DatabaseTypeSet database type
-u userImpersonate specified user
-v paramSupply a dynamic parameter
-w WorkDirSpecify directory to use as workspace
-x TableNameList table data as INSERT statements
-y FileNameTake SQL from the file
-zList tables in the database
-8Use Rev8 filenames
-?Display sql utility usage