DDTSSQL(1)

     NAME
          ddtssql - Command line interface to the ClearDDTS SQL
          Database.


     SYNOPSIS
          ddtssql [options]


     OPTIONS
          -pure
              connect to the internal database

          -oracle
              connect to an ORACLE database

          -I|-instance instance_name
              database instance name to connect to

          -U|-user user_name
              the database user name to login in as

          -P|-password password
              the database user's password

          -f|-file filename
              read SQL commands from filename

          -format 'printf_format'
              supply a printf-style format for the output

          -formatfile filename
              read a printf-style format from filename

          -h|-help
              display the usage message

          -header 'header_string'
              supply a header to use instead of the default

          -headerfile filename
              read an alternate header from filename

          -n|-noheader
              don't print the SQL header/trailer

          -parseonly
              only parse the SQL query; do not execute it

          -s|-silent
              don't print the line number prompt

     DESCRIPTION
          This program allows you to access the ClearDDTS SQL server
          via the command line.  It allows you to execute SQL queries
          and view the results.

          When ddtssql starts up, by default the following is
          displayed:

               1>

          You may enter any standard SQL command or any additional
          ddtssql commands as listed in the "COMMANDS" section below.
          As you enter lines of a command, the lines are automatically
          numbered. To terminate a command and execute it, type go on
          a line by itself or enter a semicolon (;) at the end of a
          line.


     COMMANDS
          The following commands affect the execution of ddtssql
          queries. These commands are processed by ddtssql and are not
          sent to the SQL server. These commands will only be
          recognized if they begin on the first character of a line.

          emacs|!e
              Edit the last query using emacs.

          format format_string
              Use format_string to format subsequent queries. The
              format may use any printf-style formatting characters.
              Additionally, the format %BASENAME can be used on fields
              that contain Unix pathnames to limit the output to the
              last component of the path.

          help|sp_help [tablename]
              Show help on the database schema. Display the names of
              all the tables in the database accessible by the current
              user. If tablename is specified, display the name, size,
              and datatype of each column in tablename.

          quit|exit
              Disconnect from the SQL server and exit.

          vi|!v
              Edit the last query using vi.


     DIAGNOSTICS
          If an SQL command produces syntax errors, the error will be
          displayed. Errors from the connection to the SQL server will
          normally be displayed as "Fatal Errors" and will result in
          termination of ddtssql.

     FILES
          The following files contain the default database information
          used by ddtssql.  These files are located relative to the
          current DDTS home directory.  The command line options above
          will override the values read from these files.

          dbms/conf/dbvendor
              contains the name of the vendor of the database used by
              ClearDDTS.

          dbms/conf/vendor_name
              contains the instance value where the ClearDDTS tables
              are stored and the login/password for the database user
              used for queries.

          dbms/conf/vendor_name.priv
              contains the login/password of the owner of the
              ClearDDTS tables. This file is only readable by ddts in
              order to maintain database security.

     SEE ALSO
          ddtsserver(1), adminbug(1) chdb, and adminbug(1) dbms,
          ClearDDTS Administrator's Guide