Chapter Contents |
Previous |
Next |
DBTYPE= |
Default value: | See Default Output Teradata Data Types for a list of the default data types. |
Syntax | |
Details | |
Example 1: Specifying a Data Type | |
Example 2: Specifying a Data Type and Attributes |
Syntax |
DBTYPE=(<column-name-1=<'>DBMS-type<'>> <...<column-name-n=<'>DBMS-type<'>>>) |
specifies a SAS variable name to generate a corresponding Teradata column.
specifies a Teradata data type and attributes.
Details |
This option is valid only when creating Teradata tables.
When SAS /ACCESS outputs a new table, it converts each SAS data type for a column to a default Teradata data type. For a list of the default data types, see Default Output Teradata Data Types. However, you can use DBTYPE= to override the default if you need a different Teradata data type.
You can also use DBTYPE= to specify data attributes for a column. See your Teradata CREATE TABLE documentation for information on which data type attributes that you can specify.
If you specify DBNULL=NO for a column, do not also use NOT NULL with DBTYPE= to specify this attribute for that column. If you do, 'NOT NULL' is inserted twice in the column definition. This will cause Teradata to generate an error message.
For a full description of this option, refer to
DBTYPE=.
data mydblib.newdept(dbtype=(deptno='byteint' city='char(25)')); set dept; run;
Example 1 creates a new Teradata table, NEWDEPT, specifying the Teradata
data types for the DEPTNO and CITY columns.
data mydblib.newemployees(dbtype= (empno="SMALLINT FORMAT '9(5)' CHECK (empno >= 100 AND empno <= 2000)")); set employees; run;
Example 2 creates a new Teradata table, NEWEMPLOYEES, and specifies a data type and attributes for the EMPNO column.
Note: Example 2 encloses the Teradata type and attribute information
in double quotes. Single quotes conflict with the single quotes required by
the Teradata FORMAT attribute. If you use single quotes, SAS returns syntax
error messages.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.