Datatype conversion

Table B-3 illustrates datatype conversion that is performed when a create table or alter table statement is processed using ECDA Option for Oracle with ASE. ECDA Option for Oracle constructs syntax for the Oracle datatypes as shown:

Table B-3: ASE-to-Oracle datatype conversion

ASE datatype

Oracle datatype

bit

char(1)

tinyint

number(3,0)

smallint

number(4,0)

int

number(10,0)

smallmoney

number(10,4)

money

number(19,4)

float

float

real

float

decimal(p,s)

number(p,s)

numeric(p,s)

number(p,s)

char(n)

char(n)

varchar(n)

varchar2(n)

unichar(n)

nchar(n)

univarchar(n)

nvarchar2(n)

binary(n)

raw(n)

varbinary(n)

raw(n)

timestamp

raw(16)

text

CLOB

image

BLOB

datetime

date

smalldatetime

date

date

date

time

timestamp

When a create existing table command is processed, the datatype for each column specifies the type of conversion to be performed from the Oracle columns to ASE columns during query processing. Table B-4 describes the datatypes that can be used for existing Oracle datatypes.

Table B-4: ASE-to-Oracle datatype conversions

ASE datatype

Oracle datatype

int, smallint, tinyint, float, double, numeric, decimal

number

datetime

date

date

date

time

timestamp

datetime

timestamp

char(n)

char(n)

varchar(n)

varchar2(n) up to 4000 bytes

text

CLOB

binary(n) or varbinary(n)

raw(n) up to 4000 bytes

image

BLOB