For general information, see SAS Names and Support for DBMS Names.
You can use these conventions to name such Teradata objects as include tables, views, columns, indexes, and macros.
If DBMS column names are longer than 32 characters, they are truncated to 32 characters. If truncating a column name results in identical names, SAS generates a unique name by replacing the last character with a number. If a column name is longer than 32 characters, then SAS/ACCESS attempts to store the full name in the column label. The label must not contain more than 256 bytes. If the label exceeds this 256-byte limit, an error is printed to the SAS log.
DBMS table names must be 32 characters or fewer. SAS does not truncate a longer table name. If you already have a table name that is greater than 32 characters, it is recommended that you create a table view.
CUSTOMER and Customer are
the same.Use these conventions when naming a SAS object:
CUSTOMER and Customer are
the same.To easily share objects between SAS and the DBMS, create names that meet both SAS and Teradata naming conventions:
These SAS/ACCESS code examples can help you access Teradata objects (existing Teradata DBMS tables and columns) that have names that do not follow SAS naming conventions.
libname unusual teradata user=myusr1 password=mypwd1;
proc sql dquote=ansi;
create view myview as
select * from unusual."More names";
proc print data=myview;run;
SAS/ACCESS automatically converts Teradata column names that are not valid for SAS, mapping such characters to underscores. It also appends numeric suffixes to identical names to ensure that column names are unique.
create table unusual_names( Name$ char(20), Name# char(20),
"Other strange name" char(20))
In this example, SAS/ACCESS converts the spaces found in the Teradata column name, OTHER STRANGE NAME, to Other_strange_name. After the automatic conversion, SAS programs can then reference the table as usual.
libname unusual teradata user=myusr1 password=mypwd1;
proc print data=unusual.unusual_names; run;
Name_ Name_0 Other_strange_name