Previous Page | Next Page

SAS/ACCESS Interface to Aster nCluster

Data Types for Aster nCluster


Overview

Every column in a table has a name and a data type. The data type tells Aster nCluster how much physical storage to set aside for the column and the form in which the data is stored. This information includes information about Aster nCluster data types and data conversions.

For information about Aster nCluster data types and to which data types are available for your version of Aster nCluster, see the Aster nCluster Database User's Guide.

SAS/ACCESS Interface to Aster nCluster does not directly support TIMETZ or INTERVAL types. Any columns using these types are read into SAS as character strings.


String Data

CHAR(n)

specifies a fixed-length column for character string data. The maximum length is 32,768 characters.

VARCHAR(n)

specifies a varying-length column for character string data. The maximum length is 32,768 characters.


Numeric Data

BIGINT

specifies a big integer. Values in a column of this type can range from -9223372036854775808 to +9223372036854775807.

SMALLINT

specifies a small integer. Values in a column of this type can range from -32768 through +32767.

INTEGER

specifies a large integer. Values in a column of this type can range from -2147483648 through +2147483647.

DOUBLE | DOUBLE PRECISION

specifies a floating-point number that is 64 bits long. The double precision type typically has a range of around 1E-307 to 1E+308 with a precision of at least 15 decimal digits.

REAL

specifies a floating-point number that is 32 bits long. On most platforms, the real type typically has a range of around 1E-37 to 1E+37 with a precision of at least 6 decimal digits.

DECIMAL | DEC | NUMERIC | NUM

specifies a fixed-point decimal number. The precision and scale of the number determines the position of the decimal point. The numbers to the right of the decimal point are the scale, and the scale cannot be negative or greater than the precision.


Date, Time, and Timestamp Data

SQL date and time data types are collectively called datetime values. The SQL data types for dates, times, and timestamps are listed here. Be aware that columns of these data types can contain data values that are out of range for SAS.

DATE

specifies date values. The range is 4713 BC to 5874897 AD. The default format YYYY-MM-DD; for example, 1961-06-13. Aster nCluster supports many other formats for entering date data. For more information, see your Aster nCluster Database User's Guide.

TIME

specifies time values in hours, minutes, and seconds to six decimal positions: hh:mm:ss[.nnnnnn]. The range is 00:00:00.000000 to 24:00:00.000000. Due to the ODBC-style interface that SAS/ACCESS Interface to Aster nCluster uses to communicate with the server, fractional seconds are lost in the data transfer from server to client.

TIMESTAMP

combines a date and time in the default format of yyyy-mm-dd hh:mm:ss[.nnnnnn]. For example, a timestamp for precisely 2:25 p.m. on January 25, 1991, would be 1991-01-25-14.25.00.000000. Values in a column of this type have the same ranges as described for DATE and TIME.


LIBNAME Statement Data Conversions

This table shows the default formats that SAS/ACCESS Interface to Aster nCluster assigns to SAS variables to read from an Aster nCluster table when using the Overview of the LIBNAME Statement for Relational Databases. These default formats are based on Aster nCluster column attributes.

LIBNAME Statement: Default SAS Formats for Aster nCluster Data Types
Aster nCluster Data Type SAS Data Type Default SAS Format
CHAR(n)* character $n.
VARCHAR(n)* character $n.
INTEGER numeric 11.
SMALLINT numeric 6.
BIGINT numeric 20.
DECIMAL(p,s) numeric m.n
NUMERIC(p,s) numeric m.n
REAL numeric none
DOUBLE numeric none
TIME numeric TIME8.
DATE numeric DATE9.
TIMESTAMP numeric DATETIME25.6
* n in Aster nCluster data types is equivalent to w in SAS formats.

This table shows the default Aster nCluster data types that SAS/ACCESS assigns to SAS variable formats during output operations when you use the LIBNAME statement.

LIBNAME Statement: Default Aster nCluster Data Types for SAS Variable Formats
SAS Variable Format Aster nCluster Data Type
m.n DECIMAL(p,s)
other numerics DOUBLE
$n. VARCHAR(n)*
datetime formats TIMESTAMP
date formats DATE
time formats TIME
* n in Aster nCluster data types is equivalent to w in SAS formats.

Previous Page | Next Page | Top of Page