This is an old revision of the document!


Programs: OdxSQL

Commands

The following commands are available in OdxSQL:

ATTACH DATABASE

Attach a database

ATTACH DATABASE database [AS alias] FROM filename [ON [INSTANCE] instance] [WITH options]

ATTACH SEGMENT

Attach a segment

ATTACH <INDEX | DATA> SEGMENT segment [PHYSICAL physical] [ON [INSTANCE] instance] [WITH options]

ATTACH TABLE

Attach a table

ATTACH TABLE table [PHYSICAL “physical”] (column [, column …]) [ON [INSTANCE] instance>] [WITH options] column: column-name datatype (length)

BENCHMARK

Perform performance benchmarks

BENCHMARK [<table | select-statement>] [WITH options]

CALC

Perform basic calculator functions

CALC expression

CD

Change directories

CD [path]

CLOSE CURSOR

CREATE INDEX

Create an index or index group

CREATE <OMNIDEX | QUICKTEXT | FULLTEXT | CUSTOM | NATIVE> INDEX substring> [, <column | substring> ...])] [attribute [attribute ... IN “filename” [WITH options]

CREATE INDEX GROUP [(owner)]group (table.index [, table.index …])] IN “filename” [WITH options]

CREATE SEGMENT

Create a segment

CREATE [<TEMPORARY | PERMANENT>] <INDEX | DATA> SEGMENT segment [PHYSICAL physical] [AS (select)] [ON [CURSOR] cursor] [WITH options]

CREATE TABLE

Create a table

CREATE [<[<GLOBAL | LOCAL>] TEMPORARY | PERMANENT>] TABLE table [PHYSICAL “physical”] (column [, column …]) [<IN “filename” | ON [INSTANCE] instance>] [WITH options]

column: column-name datatype (length)

DATE

Show the current date and time

DATE

DELETE

Issue an SQL delete statement

DELETE FROM table [WHERE < predicate-list | CURRENT> [<ON | OF> [CURSOR] cursor]] [WITH options]

DETACH DATABASE

Detach a previously attached database

DETACH DATABASE database [ON [INSTANCE] instance] [WITH options]

DETACH SEGMENT

Detach a previously attached segment

DETACH SEGMENT segment [ON [INSTANCE] instance] [WITH options]

DETACH TABLE

Detach a previously attached table

DETACH TABLE table [ON [INSTANCE] instance] [WITH options]

DIR

Display a directory of files

DIR fileset [WITH options]

DISCONNECT

Disconnect from an environment file

DISCONNECT [ALL] ON [INSTANCE instance] [WITH options]

DROP DATABASE

Drop a database

DROP DATABASE [IF EXISTS] database IN “filename” [WITH options]

DROP ENVIRONMENT

Drop an environment

DROP ENVIRONMENT [IF EXISTS] [environment] IN “filename” [WITH options]

DROP INDEX

Drop an index or index group

DROP [<OMNIDEX | NATIVE>] INDEX [IF EXISTS] PERMANENT>] TABLE [IF EXISTS] table [<IN "filename" | ON [INSTANCE] instance>] [WITH options] ==== EDIT ==== Edit a previous command or file EDIT [n | filename] [WITH options] ==== ERROR ==== Display an error message ERROR error_code ==== EXIT ==== Exit Omnidex SQL EXIT ==== EXPLAIN ==== Explain approach to retrieval EXPLAIN [statement] [ON [CURSOR] cursor] [WITH options] ==== EXPORT ==== Export records to a file EXPORT [statement] TO filename [ON [CURSOR] cursor] [WITH options] ==== EXTRACT ==== Extract SQL statements for database EXTRACT DDL [FOR <ENVIRONMENT [environment] | DATABASE database>] [TO filename] [ON [INSTANCE] instance] [WITH options] EXTRACT DDL FOR <MYSQL | ORACLE | ODBC | SQLSERVER> [TO filename] [ON [INSTANCE] instance] [WITH options] EXTRACT DML FOR table-list [WHERE criteria] [TO filename] [ON [INSTANCE] instance] [WITH options] EXTRACT [<ALL | n | LONGEST n | ERRORING>] QUERIES [BY <CONNECTION | STATEMENT>] [WHERE criteria] [TO filename] [ON [INSTANCE] instance] [WITH options] ==== FETCH ==== Explicitly fetch data from a database FETCH [<n | ALL>] [ON [CURSOR] cursor] [WITH options] ==== FOR ==== Form a 'FOR n ... END' construct FOR n [WITH options] <statements> END ==== FORMAT ==== Format a file of ODXSQL statements FORMAT input-file [INTO output-file] [WITH options] ==== HELP ==== Help HELP [<command | SYNTAX | API>] ==== HISTORY ==== Show history of ODXSQL commands HISTORY ==== IF ==== Form an 'IF ELIF ELSE ENDIF' construct IF condition <statements> ELIF condition <statements> ELSE <statements> ENDIF ==== INSERT ==== Issue an SQL insert statement INSERT INTO table [(column-list)] <VALUES (value-list) | select-stmt> [ON [INSTANCE] instance] [WITH options] ==== JOIN ==== Join tables using Omnidex JOIN [FROM] table USING index TO [(owner)]table USING index [ON [CURSOR] cursor] [WITH options] ==== LOAD OFX ==== Load indexes for a table LOAD OFX [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table>] [ON [INSTANCE] instance] [WITH options] ==== OPEN CURSOR ==== Open a cursor OPEN CURSOR [ON [INSTANCE] instance] [WITH options] ==== PARTITION ==== Partition a table PARTITION table [INTO n] [BY <column | expression>] [IN path] [ON [INSTANCE] instance] [WITH options] ==== PWD ==== Print current working directory PWD ==== QUALIFY ==== Qualify rows using Omnidex QUALIFY [(owner)]table WHERE [[$QUALIFIED] <AND | OR> [NOT predicate [ON [CURSOR] cursor] [WITH options]

QUIT

Quit Omnidex SQL

QUIT

REGISTER LICENSE

Register a license code

REGISTER LICENSE license_code [FOR company]

REGISTER ODBC

Register an ODBC driver

REGISTER ODBC [dir]

REQUEST

Request a license code

REQUEST [<ENTERPRISE | DEVELOPER | TRIAL>] LICENSE [FOR COMPANY “company” CONTACT “contact” PHONE “phone” EMAIL “email”]

RESET HISTORY

Reset history of ODXSQL commands

RESET HISTORY

RESET TIMER

Reset the cumulative timer

RESET TIMER

RESTORE SETTINGS

UPDATE INDEXES

Update Omnidex indexes

UPDATE INDEXES [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]

UPDATE ROLLUP

Update rollup table

UPDATE ROLLUP TABLE table [ON [INSTANCE] instance] [WITH options]

UPDATE ROLLUPS

Update rollup tables

UPDATE ROLLUPS [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table>] [ON [INSTANCE] instance] [WITH options]

UPDATE STATISTICS

Update statistical information

UPDATE STATISTICS [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]

UPDATE TEXT

Update textual statistics

UPDATE TEXT [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table | COLUMN table.column | INDEX table.index>] [ON [INSTANCE] instance] [WITH options]

USE

Execute a file of ODXSQL commands

USE filename [WHERE criteria] [WITH options]

VALIDATE

Validate an environment

VALIDATE [<ENVIRONMENT [environment] | DATABASE database | TABLE table>] [ON [INSTANCE] instance] [WITH options]

!

Execute a shell command

!<shell command> or ! for interactive shell

.

Execute last command

<. | command number>

;

Comment line

n

 Execute numbered command
 n (where n is a number from the command history)

Prev | Next |

Additional Resources

See also:

 
Back to top
programs/odxsql/commands.1433960356.txt.gz · Last modified: 2016/06/28 22:38 (external edit)