Chapter Contents |
Previous |
Next |
SAS/ACCESS Software for Relational Databases: Reference |
Every column in a table has a name and data type. The data type tells Teradata how much physical storage to set aside for the column, as well as the form in which to store the data. Teradata data types fall into categories: binary, character, date, and numeric data. Each type is described in the following sections.
Note: SAS/ACCESS Version 8 does
not support the following Teradata data types: GRAPHIC, VARGRAPHIC and LONG
VARGRAPHIC.
Binary String Data |
Character String Data |
Date Data |
The date type in Teradata is similar to the SAS date value. It is stored internally as a numeric value and is displayed in a site-defined format. The Teradata date type that SAS supports is listed here.
Note: Date
type columns may contain Teradata values that are out of range for the SAS
System, which handles dates from 1582 A.D. through 20,000 A.D. If SAS/ACCESS encounters
an unsupported date, for example, a date earlier than 1582 A.D., it will return
an error message and display the date as a missing value.
Numeric Data |
Note: When reading Teradata data,
SAS/ACCESS converts
all Teradata numeric data types to the SAS System internal format, floating-point.
If m is omitted, 0 is assigned and n can also be omitted. Omitting both n and m results in the default DECIMAL(5,0). DECIMAL is also known as NUMERIC.
Note: When the SAS/ACCESS client
internal floating point format is IEEE, Teradata FLOAT numbers convert precisely
to SAS numbers. Exact conversion applies to SAS/ACCESS for Teradata running
under UNIX MP-RAS. However, if you are running SAS/ACCESS for Teradata under
OS/390, there can be minor precision and magnitude discrepancies.
NULL and NOT NULL Values |
The NULL value means an absence of information in Teradata and is analogous to the SAS System's missing value. Therefore, when SAS/ACCESS reads a Teradata NULL value, it generates a SAS missing value.
By default, Teradata columns accept NULL values. But, you can define columns so that they will not contain NULL values. To create Teradata columns that disallow NULL values, use the DBNULL= data set option. For example, when creating a SALES table, define the CUSTOMER column NOT NULL, telling Teradata not to add a row to the table unless the CUSTOMER column for the row has a value. For more information, as well as the syntax, see DBNULL=.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.