Chapter Contents


SAS/ACCESS Software for Relational Databases: Reference

Data Object Naming Conventions

Teradata Conventions

The data objects that you can name in Teradata include tables, views, columns, indexes and macros. When naming a Teradata object, use the following conventions:

SAS Naming Conventions

When naming a SAS object use the following conventions:

Naming Objects to Meet Teradata and SAS Conventions

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

Accessing Teradata Objects That Do Not Meet SAS Naming Conventions

The following are SAS/ACCESS code examples to 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=kamdar password=ellis;
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 invalid for SAS, mapping any invalid 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 Example 2, 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, for example:

libname unusual teradata user=kamdar password=ellis;
proc print data=unusual.unusual_names; run;

        Name_          Name_0        Other_strange_name

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.