Oracle Transparent Gateway Sybase Administrator's Guide Release 8.1.6 for Windows NT Part Number A80982-01 |
| Library | Contents | Index

# A
Supported SQL Syntax and Functions

This appendix contains the following sections:.

- Supported SQL Statements

- Oracle Functions

## Supported SQL Statements

With a few exceptions, the gateway provides full support for Oracle DELETE, INSERT, SELECT, and UPDATE statements.

The gateway does not support Oracle Data Definition Language (DDL) statements. No form of the Oracle ALTER, CREATE, DROP, GRANT, or TRUNCATE statements can be used. Instead, use the pass-through feature of the gateway if you need to use DDL statements against the Sybase database.

See Also: "Using the Pass-Through Feature" and Oracle8i SQL Reference for a detailed descriptions of keywords, parameters, and options.

### DELETE

The DELETE statement is fully supported. However, only Oracle functions supported by Sybase can be used.

See Also: "Functions Supported by Sybase" for a list of supported functions.

### INSERT

The INSERT statement is fully supported. However, only Oracle functions supported by Sybase can be used.

See Also: "Functions Supported by Sybase" for a list of supported functions.

### SELECT

The SELECT statement is fully supported, with these exceptions:

- CONNECT BY condition

- FOR UPDATE

- FOR UPDATE OF

- NOWAIT

- START WITH condition

- WHERE CURRENT OF

### UPDATE

The UPDATE statement is fully supported. However, only Oracle functions supported by Sybase can be used. Also, you cannot have SQL statements in the subquery that refer to the same table name in the outer query. Subqueries are not supported in the SET clause

See Also: "Functions Supported by Sybase" for a list of supported functions.

## Oracle Functions

All functions are evaluated by the Sybase database after the gateway has converted them to Sybase SQL.

### Functions Not Supported by Sybase

Oracle SQL functions with no equivalent function in Sybase are not supported in DELETE, INSERT, or UPDATE statements, but are evaluated by the Oracle database server if the statement is a SELECT statement. That is, the Oracle database server performs post-processing of SELECT statements sent to the gateway.

If an unsupported function is used in a DELETE, INSERT, or UPDATE statement, the following Oracle error occurs:

    ORA-02070: database db_link_name does not support function in this context

### Functions Supported by Sybase

The gateway translates the following Oracle database server functions in SQL statements to their equivalent Sybase functions:

- Arithmetic Operators

- Comparison Operators

- String Functions

- Group Functions

- Other Functions

#### Arithmetic Operators

Oracle | Sybase
--- | ---
+ | +
- | -
* | *
/ | /

#### Comparison Operators

Oracle | Sybase
--- | ---
= | =
> | >
< | <
>= | >=
<= | <=
<>, !=, ^= | <>, !=
IS NOT NULL | IS NOT NULL
IS NULL | IS NULL

#### String Functions

Oracle | Sybase
--- | ---
|| | + (expression1 + expression2)
ASCII | ASCII
CHR | CHAR
INSTR | CHARINDEX
LENGTH | CHAR_LENGTH
LOWER | LOWER
SUBSTR (second argument cannot be a negative number) | SUBSTRING
UPPER | UPPER

#### Group Functions

Oracle | Sybase
--- | ---
AVG | AVG
COUNT | COUNT
MAX | MAX
MIN | MIN
SUM | SUM

#### Other Functions

Oracle | Sybase
--- | ---
ABS | ABS
CEIL | CEILING
COS | COS
EXP | EXP
FLOOR | FLOOR
LN | LOG
LOG | LOG10
MOD | %
NOT NVL | IS NOT NULL
NVL | IS NULL
POWER | POWER
ROUND | ROUND
SIN | SIN
SQRT | SQRT
TAN | TAN

| Copyright © 2001 Oracle Corporation. All Rights Reserved. |
| Library | Contents | Index