Conversion Between CCL and ODBC and Oracle

Convert CCL columns into ODBC/ SQL and Oracle.

The two tables on this page show how CCL column data types are converted into ODBC/SQL and Oracle database types and vice versa. The table assumes a Native Oracle Driver (OCI based).

How CCL Types Convert to ODBC and Oracle Types

CCL Type

ODBC Database Type

Oracle Database Type

BLOB

Base64 String

Base64 String

BOOLEAN

Integer

NUMBER (false=0, true=1)

FLOAT

Double Precision

NUMBER

INTEGER

Integer

NUMBER

INTERVAL

BIGINT

NUMBER

LONG

BIGINT

NUMBER

STRING

VARCHAR (implementation defined length)

VARCHAR/VARCHAR2 (maximum length 4096)

TIMESTAMP

TIMESTAMP

DATE

Note that, before using a BLOB column in a SQL SELECT statement within a CCL database subquery, the BLOB must first be converted to a base64- encoded string. See the Sybase CEP Integration Guide for more information on handling BLOB data.

Note that when the FLOAT value is expressed in scientific notation, ORACLE limits the exponent range to values between -130 and 125. CCL FLOAT values do not have this limitation, but must fall within this range when passing values to an Oracle database FLOAT column to avoid errors.

How ODBC and Oracle Types Convert to CCL Types

Oracle Database Type

ODBC Type

CCL Type

NUMBER (false=0, true=1)

Integer

BOOLEAN

NUMBER

Double Precision

FLOAT

NUMBER

Integer

INTEGER

NUMBER

BIGINT

INTERVAL

NUMBER

BIGINT

LONG

CHAR(N)

CHAR(N)

STRING

VARCHAR/VARCHAR2

VARCHAR

STRING

DATE

TIMESTAMP

TIMESTAMP

Note that Sybase supports one-byte character sets; it does not support multi-byte character sets such as Unicode.

An error message will appear if the value that you are converting from will not fit into the data type that you are converting to.