Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Commands

Syntax

Options

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

DETACH

Detach the attached Omnidex Standalone Table (OST) file from the open environment by using the DETACH command. Once the table is detached, it can no longer be referred to by the application, unless it is re-attached.

OST's are created using the Omnidex EXPORT statement.

export company, contact, state, status from customers, orders where customers.customer_no = orders.customer_no and status='cncl' to cncl.ost with ost

attach ost cncl as CANCELED

select company, contact from customers where state='CO'

detach ost canceled

See also: ATTACH

 

Syntax

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

DETACH OST
Required

table
Required - Table name of the OST to be detached, as it was named when the OST was attached.

[ON [INSTANCE] instance]
Optional - Specify which instance the OST was assigned to. Default is the current instance. The "INSTANCE" keyword is optional.

[WITH options]
Optional - Specify options to be used for this command.

 

Options

 

 

Example

This example creates an OST that contains customers who have canceled their order and names the OST 'canceled'. The OST is attached on the default current instance, a select statement is run, then the OST is detached.

>export company, contact, state, status from customers, orders where customers.customer_no=orders.customer_no and status='cncl' to cncl.ost with ost
79 rows exported to cncl.ost

>attach ost /users/test/cncl.ost as CANCELED

>select company, contact from customers where state='CO'
...
22 rows returned

>detach ost canceled

table CANCELED detached

 

Top