Naming Conventions for Teradata

Teradata Conventions

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.

SAS Naming Conventions

Use these conventions when naming a SAS object:

Naming Objects to Meet Teradata and SAS Conventions

To easily share objects between SAS and the DBMS, create names that meet both SAS and Teradata naming conventions:

Accessing Teradata Objects That Do Not Meet SAS Naming Conventions

Overview

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.

Example 1: Unusual Teradata Table Name

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;

Example 2: Unusual Teradata Column Names

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;
PROC PRINT Display
        Name_          Name_0        Other_strange_name
Last updated: February 3, 2026