This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
programs:odxsql:commands [2015/06/10 18:02] doc created |
programs:odxsql:commands [2015/06/10 22:56] doc |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
+ | ~~NOTOC~~ | ||
====== Programs: OdxSQL ====== | ====== Programs: OdxSQL ====== | ||
Line 15: | Line 15: | ||
- | ATTACH DATABASE | + | ==== ATTACH DATABASE ==== |
- | * Attach a database | + | The ATTACH DATABASE command attaches a database from one environment into the currently connected environment, thereby allowing SQL statements to access both databases. |
- | * ATTACH DATABASE database [AS alias] FROM filename [ON [INSTANCE] instance] | + | <code> |
- | [WITH options] | + | ATTACH DATABASE database [AS alias] FROM filename [ON [INSTANCE] instance] |
+ | [WITH options] | ||
+ | </code> | ||
- | ATTACH SEGMENT | + | ==== ATTACH SEGMENT ==== |
- | * Attach a segment | + | The ATTACH SEGMENT command attaches a previously-created segment into the currently connected environment so that it can be referenced in subsequent SQL statements. Segments are created using the CREATE SEGMENT command. |
- | * ATTACH <INDEX | DATA> SEGMENT segment [PHYSICAL physical] | + | <code> |
- | [ON [INSTANCE] instance] [WITH options] | + | ATTACH <INDEX | DATA> SEGMENT segment [PHYSICAL physical] |
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | ATTACH TABLE | + | ==== ATTACH TABLE ==== |
- | * Attach a table | + | The ATTACH TABLE command attaches a raw data file or a delimited file into the currently connected environment, thereby allowing SQL statements to access both databases. Note that attached tables are not indexed with Omnidex. For attaching indexed tables, use the ATTACH DATABASE command. |
- | * ATTACH TABLE table [PHYSICAL "physical"] (column [, column ...]) | + | <code> |
- | [ON [INSTANCE] instance>] [WITH options] | + | ATTACH TABLE table [PHYSICAL "physical"] (column [, column ...]) |
- | column: column-name datatype (length) | + | [ON [INSTANCE] instance>] [WITH options] |
+ | column: column-name datatype (length) | ||
+ | </code> | ||
- | BENCHMARK | + | ==== BENCHMARK ==== |
- | Perform performance benchmarks | + | The BENCHMARK command provides a menu of performance benchmarks that can be performed, focusing on POSIX file I/O. |
- | BENCHMARK [<table | select-statement>] [WITH options] | + | <code> |
+ | BENCHMARK [<table | select-statement>] [WITH options] | ||
+ | </code> | ||
- | CALC | + | ==== CALC ==== |
- | Perform basic calculator functions | + | The CALC command provides a very basic calculator, allowing formulas like "CALC (123+456)*789". |
- | CALC expression | + | <code> |
+ | CALC expression | ||
+ | </code> | ||
- | CD | + | ==== CD ==== |
- | Change directories | + | The CD command changes the current working directory within the OdxSQL session. The current working directory outside of OdxSQL remains unchanged. |
- | CD [path] | + | <code> |
+ | CD [path] | ||
+ | </code> | ||
- | CLOSE CURSOR | + | ==== CLOSE CURSOR ==== |
- | * Close a cursor | + | The CLOSE CURSOR command closes a cursor that was previously opened using the OPEN CURSOR command. |
- | * CLOSE CURSOR [[ON] CURSOR] cursor] [WITH options] | + | <code> |
+ | CLOSE CURSOR [[ON] CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | CONNECT | + | ==== CONNECT ==== |
- | * Connect to an environment file | + | The CONNECT command connects to an Omnidex environment file. The USING clause allows the connection to be performed using the ODBC or JDBC client interfaces. |
- | * CONNECT [TO] connection_string [USING api] [WITH options] | + | <code> |
- | Connection string syntax: | + | CONNECT [TO] connection_string [USING api] [WITH options] |
- | [ host:port:pool ] filename [ node ] &options | + | Connection string syntax: |
- | Examples: | + | [ host:port:pool ] filename [ node ] &options |
- | CONNECT example.xml | + | Examples: |
- | CONNECT [server1:7555]example.xml | + | CONNECT example.xml |
- | CONNECT [server1:7555:pool1] | + | CONNECT [server1:7555]example.xml |
+ | CONNECT [server1:7555:pool1] | ||
+ | </code> | ||
- | CONVERT | + | ==== CONVERT ==== |
- | Export a file with data conversions | + | The CONVERT command allows a SELECT statement to be exported while interactively prompting for data conversions of each retrieved column. |
- | CONVERT [statement TO filename [ON [CURSOR] cursor] [WITH options] | + | <code> |
+ | CONVERT [statement TO filename [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | CREATE DATABASE | + | ==== CREATE DATABASE ==== |
- | * Create a database | + | The CREATE DATABASE command allows a database to be declared in an Omnidex environment file. For details on CREATE DATABASE statements for each database type, consult the [[integration:home|Integration section]] of the documentation. |
- | * CREATE DATABASE database node [node ...] IN "filename" [WITH options] | + | <code> |
- | node: [NODE node] TYPE type [attribute [attribute ...]] | + | CREATE DATABASE database |
+ | ... | ||
+ | IN "filename" [WITH options] | ||
+ | </code> | ||
- | CREATE ENVIRONMENT | + | ==== CREATE ENVIRONMENT ==== |
- | * Create an environment file | + | The CREATE ENVIRONMENT command creates a new Omnidex environment file. |
- | * CREATE ENVIRONMENT environment [attribute [attribute ...]] | + | <code> |
- | [node [node ...]] IN "filename" [WITH options] | + | CREATE ENVIRONMENT environment |
- | node: [NODE node] [attribute [attribute ...]] | + | [OPTIONS options] |
+ | [NODE node_declaration] | ||
+ | IN "filename" | ||
+ | </code> | ||
- | CREATE INDEX | + | ==== CREATE INDEX ==== |
- | * Create an index or index group | + | The CREATE INDEX and CREATE INDEX GROUP commands create indexes in an Omnidex environment file. For details on CREATE INDEX and CREATE INDEX GROUP statements, consult the [[admin:indexing:creation:home|Index Creation section]] of the documentation. |
- | * CREATE <OMNIDEX | QUICKTEXT | FULLTEXT | CUSTOM | NATIVE> INDEX | + | <code> |
- | [[(owner)]table.]index [ON table] | + | CREATE <OMNIDEX | QUICKTEXT | FULLTEXT | CUSTOM | NATIVE> INDEX |
- | (<column | substring> [, <column | substring> ...])] | + | [[(owner)]table.]index [ON table] |
- | [attribute [attribute ...]] IN "filename" [WITH options] | + | (<column | substring> [, <column | substring> ...])] |
- | CREATE INDEX GROUP [(owner)]group | + | [attribute [attribute ...]] IN "filename" [WITH options] |
- | (table.index [, table.index ...])] IN "filename" [WITH options] | + | |
- | CREATE SEGMENT | + | CREATE INDEX GROUP [(owner)]group |
+ | (table.index [, table.index ...])] IN "filename" [WITH options] | ||
+ | </code> | ||
- | * Create a segment | ||
- | * CREATE [<TEMPORARY | PERMANENT>] <INDEX | DATA> SEGMENT segment | + | ==== CREATE SEGMENT ==== |
- | [PHYSICAL physical] [AS (select)] [ON [CURSOR] cursor] | + | |
- | [WITH options] | + | |
- | CREATE TABLE | + | The CREATE SEGMENT command creates a data segment or an index segment, thereby allowing it to be referenced in subsequent queries. |
- | * Create a table | + | <code> |
+ | CREATE [<TEMPORARY | PERMANENT>] <INDEX | DATA> SEGMENT segment | ||
+ | [PHYSICAL physical] [AS (select)] [ON [CURSOR] cursor] | ||
+ | [WITH options] | ||
+ | </code> | ||
- | * CREATE [<[<GLOBAL | LOCAL>] TEMPORARY | PERMANENT>] TABLE table | + | ==== CREATE TABLE ==== |
- | [PHYSICAL "physical"] (column [, column ...]) | + | |
- | [<IN "filename" | ON [INSTANCE] instance>] [WITH options] | + | |
- | column: column-name datatype (length) | + | |
- | DATE | + | The CREATE TABLE command creates a table in the current connection. If the IN clause is used, then the CREATE TABLE command creates a table declaration in an Omnidex environment file. For details on CREATE TABLE statements for each database type, consult the [[integration:home|Integration section]] of the documentation. |
- | Show the current date and time | + | <code> |
+ | CREATE [<[<GLOBAL | LOCAL>] TEMPORARY | PERMANENT>] TABLE table | ||
+ | [PHYSICAL "physical"] (column [, column ...]) | ||
+ | [<IN "filename" | ON [INSTANCE] instance>] [WITH options] | ||
+ | column: column-name datatype (length) | ||
+ | </code> | ||
- | DATE | + | column: column-name datatype (length) |
- | DELETE | + | ==== DATE ==== |
- | * Issue an SQL delete statement | + | The DATE command shows the current date and time. |
- | * DELETE FROM table [WHERE < predicate-list | CURRENT> | + | <code> |
- | [<ON | OF> [CURSOR] cursor]] [WITH options] | + | DATE |
+ | </code> | ||
- | DETACH DATABASE | + | ==== DELETE ==== |
- | * Detach a previously attached database | + | The DELETE command deletes one or more rows from a table. |
- | * DETACH DATABASE database [ON [INSTANCE] instance] [WITH options] | + | <code> |
+ | DELETE FROM table [WHERE <predicate-list | CURRENT> | ||
+ | [<ON | OF> [CURSOR] cursor]] [WITH options] | ||
+ | </code> | ||
- | DETACH SEGMENT | + | ==== DETACH DATABASE ==== |
- | * Detach a previously attached segment | + | The DETACH DATABASE command detaches a database that was previously attached using the ATTACH DATABASE command. |
- | * DETACH SEGMENT segment [ON [INSTANCE] instance] [WITH options] | + | <code> |
+ | DETACH DATABASE database [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | DETACH TABLE | + | ==== DETACH SEGMENT ==== |
- | * Detach a previously attached table | + | The DETACH SEGMENT command detaches a segment that was previously attached using the ATTACH SEGMENT command. |
- | * DETACH TABLE table [ON [INSTANCE] instance] [WITH options] | + | <code> |
+ | DETACH SEGMENT segment [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | DIR | + | ==== DETACH TABLE ==== |
- | Display a directory of files | + | The DETACH TABLE command detaches a table that was previously attached using the ATTACH TABLE command. |
- | DIR fileset [WITH options] | + | <code> |
+ | DETACH TABLE table [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | DISCONNECT | + | ==== DIR ==== |
- | * Disconnect from an environment file | + | The DIR command lists the files named in the fileset, optionally showing details for each file. |
- | * DISCONNECT [ALL] [[ON [INSTANCE]] instance] [WITH options] | + | <code> |
+ | DIR fileset [WITH options] | ||
+ | </code> | ||
- | DROP DATABASE | + | ==== DISCONNECT ==== |
- | * Drop a database | + | The DISCONNECT command disconnects from the Omnidex environment file. |
- | * DROP DATABASE [IF EXISTS] database IN "filename" [WITH options] | + | <code> |
+ | DISCONNECT [ALL] [[ON [INSTANCE]] instance] [WITH options] | ||
+ | </code> | ||
- | DROP ENVIRONMENT | + | ==== DROP DATABASE ==== |
- | * Drop an environment | + | The DROP DATABASE command drops a database from an Omnidex environment file. |
- | * DROP ENVIRONMENT [IF EXISTS] [environment] IN "filename" [WITH options] | + | <code> |
+ | DROP DATABASE [IF EXISTS] database IN "filename" [WITH options] | ||
+ | </code> | ||
- | DROP INDEX | + | ==== DROP ENVIRONMENT ==== |
- | * Drop an index or index group | + | The DROP ENVIRONMENT command drops and deletes an Omnidex environment file. |
- | * DROP [<OMNIDEX | NATIVE>] INDEX [IF EXISTS] [[(owner)]table.]index [ON table] | + | <code> |
- | IN "filename" [WITH options] | + | DROP ENVIRONMENT [IF EXISTS] [environment] IN "filename" [WITH options] |
- | DROP INDEX GROUP [IF EXISTS] [(owner)]group IN "filename" [WITH options] | + | </code> |
- | DROP SEGMENT | + | ==== DROP INDEX ==== |
- | * Drop a segment | + | The DROP INDEX and DROP INDEX GROUP commands drop an index or index group from an Omnidex environment file. |
- | * DROP SEGMENT [IF EXISTS] segment [ON [INSTANCE] instance>] [WITH options] | + | <code> |
+ | DROP [<OMNIDEX | NATIVE>] INDEX [IF EXISTS] [[(owner)]table.]index [ON table] | ||
+ | IN "filename" [WITH options] | ||
+ | </code> | ||
- | DROP TABLE | + | <code> |
+ | DROP INDEX GROUP [IF EXISTS] [(owner)]group IN "filename" [WITH options] | ||
+ | </code> | ||
- | * Drop a table | + | ==== DROP SEGMENT ==== |
- | * DROP [<TEMPORARY | PERMANENT>] TABLE [IF EXISTS] table | + | The DROP SEGMENT command drops a segment that was previously created using the CREATE SEGMENT command. |
- | [<IN "filename" | ON [INSTANCE] instance>] [WITH options] | + | |
- | EDIT | + | <code> |
+ | DROP SEGMENT [IF EXISTS] segment [ON [INSTANCE] instance>] [WITH options] | ||
+ | </code> | ||
- | Edit a previous command or file | + | ==== DROP TABLE ==== |
- | EDIT [n | filename] [WITH options] | + | The DROP TABLE command drops a table that was previously created using the CREATE TABLE command. |
- | ERROR | + | <code> |
+ | DROP [<TEMPORARY | PERMANENT>] TABLE [IF EXISTS] table | ||
+ | [<IN "filename" | ON [INSTANCE] instance>] [WITH options] | ||
+ | </code> | ||
- | Display an error message | + | ==== EDIT ==== |
- | ERROR error_code | + | The EDIT command launches an editor with the previously submitted command. Upon exiting the editor, the command will be automatically executed. |
- | EXIT | + | <code> |
+ | EDIT [n | filename] [WITH options] | ||
+ | </code> | ||
- | Exit Omnidex SQL | + | ==== ERROR ==== |
- | EXIT | + | The ERROR command displays the error message associated with an Omnidex error code. |
- | EXPLAIN | + | <code> |
+ | ERROR error_code | ||
+ | </code> | ||
- | Explain approach to retrieval | + | ==== EXIT ==== |
- | EXPLAIN [statement] [ON [CURSOR] cursor] [WITH options] | + | The EXIT command exits the OdxSQL program. |
- | EXPORT | + | <code> |
+ | EXIT | ||
+ | </code> | ||
- | * Export records to a file | + | ==== EXPLAIN ==== |
- | * EXPORT [statement] TO filename [ON [CURSOR] cursor] [WITH options] | + | The EXPLAIN command displays the query plan for the previously run query. |
- | EXTRACT | + | <code> |
+ | EXPLAIN [statement] [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | * Extract SQL statements for database | + | ==== EXPORT ==== |
- | * EXTRACT DDL [FOR <ENVIRONMENT [environment] | DATABASE database>] | + | The EXPORT command exports the result of a SELECT statement into a raw data file or delimited file. |
- | [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 | + | <code> |
+ | EXPORT [statement] TO filename [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | Explicitly fetch data from a database | + | ==== EXTRACT ==== |
- | FETCH [<n | ALL>] [ON [CURSOR] cursor] [WITH options] | + | The EXTRACT command extracts various types of statements from the currently-connected Omnidex environment file or from the system logs. |
- | FOR | + | <code> |
+ | 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] | ||
+ | </code> | ||
- | Form a 'FOR n ... END' construct | + | ==== FETCH ==== |
- | FOR n [WITH options] | + | The FETCH command fetches individual rows following a SELECT statement. The FETCH command is only needed if the SET AUTOFETCH OFF command is issued. |
- | <statements> | + | |
- | END | + | |
- | FORMAT | + | <code> |
+ | FETCH [<n | ALL>] [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | Format a file of ODXSQL statements | + | ==== FOR ==== |
- | FORMAT input-file [INTO output-file] [WITH options] | + | The FOR contruct provides a simple method for repeating one or more statements multiple times. |
- | HELP | + | <code> |
+ | FOR n [WITH options] | ||
+ | <statements> | ||
+ | END | ||
+ | </code> | ||
- | Help | + | ==== FORMAT ==== |
- | HELP [<command | SYNTAX | API>] | + | The FORMAT command formats a file containing Omnidex SQL statements. |
- | HISTORY | + | <code> |
+ | FORMAT input-file [INTO output-file] [WITH options] | ||
+ | </code> | ||
- | Show history of ODXSQL commands | + | ==== HELP ==== |
- | HISTORY | + | The HELP command shows the commands available in OdxSQL. |
- | IF | + | <code> |
+ | HELP [<command | SYNTAX | API>] | ||
+ | </code> | ||
- | Form an 'IF ELIF ELSE ENDIF' construct | + | ==== HISTORY ==== |
- | IF condition | + | The HISTORY command shows a history of the commands previously entered in this session of OdxSQL. |
- | <statements> | + | |
- | ELIF condition | + | |
- | <statements> | + | |
- | ELSE | + | |
- | <statements> | + | |
- | ENDIF | + | |
- | INSERT | + | <code> |
+ | HISTORY | ||
+ | </code> | ||
- | * Issue an SQL insert statement | + | ==== IF ==== |
- | * INSERT INTO table [(column-list)] <VALUES (value-list) | select-stmt> | + | The IF contruct provides a simple method for IF/ELSE logic in OdxSQL. |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | JOIN | + | <code> |
+ | IF condition | ||
+ | <statements> | ||
+ | ELIF condition | ||
+ | <statements> | ||
+ | ELSE | ||
+ | <statements> | ||
+ | ENDIF | ||
+ | </code> | ||
- | * Join tables using Omnidex | + | ==== INSERT ==== |
- | * JOIN [FROM] table USING index TO [(owner)]table USING index | + | The INSERT command inserts data into a table. |
- | [ON [CURSOR] cursor] [WITH options] | + | |
- | LOAD OFX | + | <code> |
+ | INSERT INTO table [(column-list)] <VALUES (value-list) | select-stmt> | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Load indexes for a table | + | ==== JOIN ==== |
- | * LOAD OFX [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table>] | + | The JOIN command performs an index join between two tables, and must follow a QUALIFY statement. |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | OPEN CURSOR | + | <code> |
+ | JOIN [FROM] table USING index TO [(owner)]table USING index | ||
+ | [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | * Open a cursor | + | ==== LOAD OFX ==== |
- | * OPEN CURSOR [ON [INSTANCE] instance] [WITH options] | + | The LOAD OFX command loads Offset Indexes (OFX's) for any delimited files in the Omnidex environment. |
- | PARTITION | + | <code> |
+ | LOAD OFX [FOR <ENVIRONMENT [environment] | DATABASE database | TABLE table>] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Partition a table | + | ==== OPEN CURSOR ==== |
- | * PARTITION table [INTO n] [BY <column | expression>] [IN path] | + | The OPEN CURSOR command opens a suppplemental cursor for this connection. The CONNECT statement automatically provides an initial cursor, so the OPEN CURSOR command is only needed if multiple cursors are required. |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | PWD | + | <code> |
+ | OPEN CURSOR [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | Print current working directory | + | ==== PARTITION ==== |
- | PWD | + | The PARTITION command partitions a table into multiple files in preparation for use in Omnidex Grids. |
- | QUALIFY | + | <code> |
+ | PARTITION table [INTO n] [BY <column | expression>] [IN path] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Qualify rows using Omnidex | + | ==== PWD ==== |
- | * QUALIFY [(owner)]table WHERE [[$QUALIFIED] <AND | OR> [NOT]] | + | The PWD command displays the current working directory. |
- | predicate [ON [CURSOR] cursor] [WITH options] | + | |
- | QUIT | + | <code> |
+ | PWD | ||
+ | </code> | ||
- | Quit Omnidex SQL | + | ==== QUALIFY ==== |
- | QUIT | + | The QUALIFY command directly queries the Omnidex indexes, as a more granular alternative to issuing a SELECT statement. |
- | REGISTER LICENSE | + | <code> |
+ | QUALIFY [(owner)]table WHERE [[$QUALIFIED] <AND | OR> [NOT]] | ||
+ | predicate [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | Register a license code | + | ==== QUIT ==== |
- | REGISTER LICENSE license_code [FOR company] | + | The QUIT command exits the OdxSQL program. |
- | REGISTER ODBC | + | <code> |
+ | QUIT | ||
+ | </code> | ||
- | Register an ODBC driver | + | ==== REGISTER LICENSE ==== |
- | REGISTER ODBC [dir] | + | The REGISTER LICENSE command registers a license code that has been received from the Omnidex licensing server. |
- | REQUEST | + | <code> |
+ | REGISTER LICENSE license_code [FOR company] | ||
+ | </code> | ||
- | Request a license code | + | ==== REGISTER ODBC ==== |
- | REQUEST [<ENTERPRISE | DEVELOPER | TRIAL>] LICENSE | + | The REGISTER ODBC command registers the ODBC driver for the current version of Omnidex. This is done automatically when Omnidex is installed on the server. |
- | [FOR COMPANY "company" | + | |
- | CONTACT "contact" | + | |
- | PHONE "phone" | + | |
- | EMAIL "email"] | + | |
- | RESET HISTORY | + | <code> |
+ | REGISTER ODBC [dir] | ||
+ | </code> | ||
- | Reset history of ODXSQL commands | + | ==== REQUEST ==== |
- | RESET HISTORY | + | The REQUEST command prompts for and sends a license request for this server. |
- | RESET TIMER | + | <code> |
+ | REQUEST [<ENTERPRISE | DEVELOPER | TRIAL>] LICENSE | ||
+ | </code> | ||
- | Reset the cumulative timer | + | ==== RESET HISTORY ==== |
- | RESET TIMER | + | The RESET HISTORY command clears the history of commands for this OdxSQL session. |
- | RESTORE SETTINGS | + | <code> |
+ | RESET HISTORY | ||
+ | </code> | ||
- | Restore settings, optionally from a file | + | ==== RESET TIMER ==== |
- | RESTORE SETTINGS [[FROM] filename] [WITH options] | + | The RESET TIMER command resets the cumulative timer that was set using SET TIMER CUMULATIVE. |
- | SAVE HISTORY | + | <code> |
+ | RESET TIMER | ||
+ | </code> | ||
- | Save commands to file | + | ==== RESTORE SETTINGS ==== |
- | SAVE HISTORY [[TO] filename] [WITH options] | + | The RESTORE SETTINGS command restores the default settings for OdxSQL. Alternatively, the RESTORE SETTINGS command loads the saved settings from a file created with the SAVE SETTINGS command. |
- | SAVE SETTINGS | + | <code> |
+ | RESTORE SETTINGS [[FROM] filename] [WITH options] | ||
+ | </code> | ||
- | Save settings, optionally to a file | + | ==== SAVE HISTORY ==== |
- | SAVE SETTINGS [[TO] filename] [WITH options] | + | The SAVE HISTORY command saves the history of commands from this OdxSQL session into a file. |
- | SELECT | + | <code> |
+ | SAVE HISTORY [[TO] filename] [WITH options] | ||
+ | </code> | ||
- | * Issue an SQL select statement | + | ==== SAVE SETTINGS ==== |
- | * SELECT statement [ON [CURSOR] cursor] [WITH options] | + | The SAVE SETTINGS command saves the current OdxSQL settings to a file. |
- | SET | + | <code> |
+ | SAVE SETTINGS [[TO] filename] [WITH options] | ||
+ | </code> | ||
- | Set an option | + | ==== SELECT ==== |
- | SET [<option | ?>] [ON <INSTANCE | CURSOR> n] | + | The SELECT command processes a SQL SELECT statement and displays the results. |
- | SETENV | + | <code> |
+ | SELECT statement [ON [CURSOR] cursor] [WITH options] | ||
+ | </code> | ||
- | * Set an environment variable | + | ==== SET ==== |
- | * SETENV variable value | + | The SET command sets an OdxSQL option. See the [[programs:odxsql:options|Options section]] for a listing of OdxSQL options. |
- | SHOW | + | <code> |
+ | SET [<option | ?>] [ON <INSTANCE | CURSOR> n] | ||
+ | </code> | ||
- | Describe an object | + | ==== SETENV ==== |
- | SHOW <ENVIRONMENT [environment] | DATABASE database | TABLE table | | + | The SETENV command sets a system environment variable for the duration of this OdxSQL session. |
- | COLUMN column> [ON [INSTANCE] instance] [WITH options] | + | |
- | SHOW [<USER_ | DATA_ | METADATA_ | SYSTEM_ | ALL_>] | + | |
- | <DATABASES | TABLES | COLUMNS> | + | |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | SHOW ALL [database] [ON [INSTANCE] instance] [WITH options] | + | |
- | SHOW <INSTANCE | CURSOR> [object] [WITH options] | + | |
- | SHOW LICENSE | + | |
- | SHOW <CONNECTIONS | STATEMENTS> | + | |
- | TRANSFER LICENSE | + | <code> |
+ | SETENV variable value | ||
+ | </code> | ||
- | Transfer a license to another server | + | ==== SHOW ==== |
- | TRANSFER LICENSE | + | The SHOW command displays information about the current Omnidex environment or the Omnidex system. |
- | UNREGISTER ODBC | + | <code> |
+ | SHOW <ENVIRONMENT [environment] | DATABASE database | TABLE table | | ||
+ | COLUMN column> [ON [INSTANCE] instance] [WITH options] | ||
+ | SHOW [<USER_ | DATA_ | METADATA_ | SYSTEM_ | ALL_>] | ||
+ | <DATABASES | TABLES | COLUMNS> | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | SHOW ALL [database] [ON [INSTANCE] instance] [WITH options] | ||
+ | SHOW <INSTANCE | CURSOR> [object] [WITH options] | ||
+ | SHOW LICENSE | ||
+ | SHOW <CONNECTIONS | STATEMENTS> [WITH options] | ||
+ | </code> | ||
- | Unregister an ODBC driver | + | ==== TRANSFER LICENSE ==== |
- | UNREGISTER ODBC | + | The TRANSFER LICENSE command initiates a transfer of this license to another server. |
- | UPDATE | + | <code> |
+ | TRANSFER LICENSE | ||
+ | </code> | ||
- | * Issue an SQL update statement | + | ==== UNREGISTER ODBC ==== |
- | * UPDATE table SET column-assignments | + | The UNREGISTER ODBC command unregisters the current ODBC driver. This is not needed unless directed by DISC Technical Support. |
- | [WHERE <predicate-list | CURRENT> [<ON | OF> [CURSOR] cursor]] | + | |
- | [WITH options] | + | |
- | UPDATE INDEXES | + | <code> |
+ | UNREGISTER ODBC | ||
+ | </code> | ||
- | * Update Omnidex indexes | + | ==== UPDATE ==== |
- | * UPDATE INDEXES [FOR <ENVIRONMENT [environment] | DATABASE database | | + | The UPDATE command updates a row in a table. |
- | TABLE table | COLUMN table.column | INDEX table.index>] | + | |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | UPDATE ROLLUP | + | <code> |
+ | UPDATE table SET column-assignments | ||
+ | [WHERE <predicate-list | CURRENT> [<ON | OF> [CURSOR] cursor]] | ||
+ | [WITH options] | ||
+ | </code> | ||
- | * Update rollup table | + | ==== UPDATE INDEXES ==== |
- | * UPDATE ROLLUP TABLE table [ON [INSTANCE] instance] [WITH options] | + | The UPDATE INDEXES command rebuilds the Omnidex indexes for the current Omnidex environment. |
- | UPDATE ROLLUPS | + | <code> |
+ | UPDATE INDEXES [FOR <ENVIRONMENT [environment] | DATABASE database | | ||
+ | TABLE table | COLUMN table.column | INDEX table.index>] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Update rollup tables | + | ==== UPDATE ROLLUP ==== |
- | * UPDATE ROLLUPS [FOR <ENVIRONMENT [environment] | DATABASE database | | + | The UPDATE ROLLUP command rebuilds an individual rollup table declared in the Omnidex environment file. |
- | TABLE table>] [ON [INSTANCE] instance] [WITH options] | + | |
- | UPDATE STATISTICS | + | <code> |
+ | UPDATE ROLLUP TABLE table [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Update statistical information | + | ==== UPDATE ROLLUPS ==== |
- | * UPDATE STATISTICS [FOR <ENVIRONMENT [environment] | DATABASE database | | + | The UPDATE ROLLUPS command rebuilds all rollup tables declared in the Omnidex environment file. |
- | TABLE table | COLUMN table.column | INDEX table.index>] | + | |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | UPDATE TEXT | + | <code> |
+ | UPDATE ROLLUPS [FOR <ENVIRONMENT [environment] | DATABASE database | | ||
+ | TABLE table>] [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | * Update textual statistics | + | ==== UPDATE STATISTICS ==== |
- | * UPDATE TEXT [FOR <ENVIRONMENT [environment] | DATABASE database | | + | The UPDATE STATISTICS command refreshes the statistics for the current Omnidex environment file. This step is automatically done within an UPDATE INDEXES command. |
- | TABLE table | COLUMN table.column | INDEX table.index>] | + | |
- | [ON [INSTANCE] instance] [WITH options] | + | |
- | USE | + | <code> |
+ | UPDATE STATISTICS [FOR <ENVIRONMENT [environment] | DATABASE database | | ||
+ | TABLE table | COLUMN table.column | INDEX table.index>] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | Execute a file of ODXSQL commands | + | ==== UPDATE TEXT ==== |
- | USE filename [WHERE criteria] [WITH options] | + | The UPDATE TEXT command refreshes the PowerSearch dictionaries for the current Omnidex environment file. This step is automatically done within an UPDATE INDEXES command. |
- | criteria: SQL syntax referencing SECTION, TEST and/or LINE | + | |
- | VALIDATE | + | <code> |
+ | UPDATE TEXT [FOR <ENVIRONMENT [environment] | DATABASE database | | ||
+ | TABLE table | COLUMN table.column | INDEX table.index>] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | Validate an environment | + | ==== USE ==== |
- | VALIDATE [<ENVIRONMENT [environment] | DATABASE database | TABLE table>] | + | The USE command executes the statements within the named file. See the [[programs:odxsql:files|Files section]] for more information. |
- | [ON [INSTANCE] instance] [WITH options] | + | |
+ | <code> | ||
+ | USE filename [WHERE criteria] [WITH options] | ||
+ | </code> | ||
- | ! | + | ==== VALIDATE ==== |
- | Execute a shell command | + | The VALIDATE command runs a series of tests to insure that an Omnidex environment is properly set up. |
- | !<shell command> or ! for interactive shell | + | <code> |
+ | VALIDATE [<ENVIRONMENT [environment] | DATABASE database | TABLE table>] | ||
+ | [ON [INSTANCE] instance] [WITH options] | ||
+ | </code> | ||
- | . | ||
- | Execute last command | + | ==== ! ==== |
- | <. | command number> | + | The '!' command launches an interactive system shell from within OdxSQL. If an operating system command is provided after the exclamation point, that command is issued without launching an interative system shell. |
- | ; | + | <code> |
+ | !<shell command> or ! for interactive shell | ||
+ | </code> | ||
- | Comment line | + | ==== . ==== |
- | ; [<directive [directive ...]>] text | + | The '.' command re-executes the last command. |
- | <SUSPEND> <RESUME> <VERBOSE> <QUIET> | + | |
- | <COMMON> <END_COMMON> <SECTION> <END_SECTION> <TEST> <END_TEST> | + | |
- | + | <code> | |
- | n | + | <. | command number> |
+ | </code> | ||
- | Execute numbered command | + | ==== ; ==== |
- | n (where n is a number from the command history) | + | The semicolon represents a command in OdxSQL. |
+ | <code> | ||
+ | ; Comment ... | ||
+ | </code> | ||
+ | |||
+ | ==== n ==== | ||
+ | The 'n' command executes the numbered command from the OdxSQL history, shown using the HISTORY command. | ||
+ | <code> | ||
+ | n (where n is a number from the command history) | ||
+ | </code> | ||
+ | ===== ===== | ||
- | + | **[[programs:odxsql:home|Prev]]** | **[[programs:odxsql:options|Next]]** | |
- | + | ||
- | ===== ===== | + | |
- | + | ||
- | **[[programs:odxsql:home|Prev]]** | **[[programs:odxsql:options|Next]]** | | + | |
====== Additional Resources ====== | ====== Additional Resources ====== | ||
Line 540: | Line 679: | ||
{{page>:bottom_add&nofooter&noeditbtn}} | {{page>:bottom_add&nofooter&noeditbtn}} | ||
+ | |||