Syntax
statement [ON [CURSOR] n | [INSTANCE] n] [WITH
option1[, option2]]
statement
Required. Any valid SQL statement supported by Omnidex.
ON [CURSOR | INSTANCE] n
Optional.
WITH
Required if specifying options to be used for this current
statement. Omit otherwise.
options
Required if specifying options to be used for the current
statement. Omit otherwise. This is a comma separated list
of options valid for the current statement.
top
OdxSQL Example
Options passed in the WITH clause will be applied to all
appropriate underlying OA API routines. For example, an EXPORT
statement passed through oaexecsql will also cause calls to
oaselect and oaexport. If the CHAR option is passed in the
WITH clause of the SQL statement in oaexecsql, it will be
applied to both oaselect and oaexport.
EXPORT COMPANY, CONTACT, PHONE FROM CUSTOMERS
WHERE STATE='CO' TO CUSTS.TXT WITH CHAR=AUTO
It is possible to control which underlying functions a particular
option is applied to. For example, the above example applies
the CHAR option to both oaselect and oaexport, by default.
However, this option can be applied to only one of these underlying
functions by appending the function name, with a colon, to
the front of the option, as shown:
EXPORT COMPANY, CONTACT, PHONE FROM CUSTOMERS
WHERE STATE='CO' TO CUSTS.TXT WITH OAEXPORT:CHAR=AUTO
In this case, CHAR=AUTO is applied to oaexport but not oaselect.
Each of the underlying OA API routines support a different
set of options.
top
|