Naming Conventions for ODBC

For general information, see SAS Names and Support for DBMS Names.

Because ODBC is an application programming interface (API) rather than a database, table names and column names are determined at run time. Most SAS names can be up to 32 characters long. SAS/ACCESS Interface to ODBC supports table names and column names that contain up to 32 characters. If DBMS column names are longer than 32 characters, SAS truncates them to 32 characters. If truncating a column name would result in identical names, SAS generates a unique name by replacing the last character with a number. DBMS table names must be 32 characters. SAS does not truncate a longer name. If you already have a table name that is greater than 32 characters, it is recommended that you create a table view.

The PRESERVE_TAB_NAMES= and PRESERVE_COL_NAMES= options determine how this interface handles case sensitivity, spaces, and special characters. (For information about these options, see LIBNAME Statement for Relational Databases.)

This example specifies SAP ASE as the DBMS.

libname mydblib odbc user=myusr1 password=mypwd1
        database=sapase;

data mydblib.a;
   x=1;
   y=2;
run;

SAP ASE is generally case sensitive. This example would therefore produce an SAP ASE table named a with columns named x and y.

If the DBMS being accessed is not case sensitive, such as Oracle, the example would produce an Oracle table named A and columns named X and Y. The object names would be normalized to uppercase.

Last updated: February 3, 2026