Chapter Contents


SAS/ACCESS Software for Relational Databases: Reference

ODBC Naming Conventions

Since ODBC is not a database but rather is an application programming interface, or API, table names and column names are determined at run time as described here. Beginning in Version 7 of SAS, table or column names can be up to 32 characters long. The ODBC engine supports table and column names up to 32 characters long. If the DBMS table names or column names are longer than 32 characters, they will be truncated to 32 characters.

PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES= are two LIBNAME options that specify whether to preserve spaces, special characters, and mixed case in DBMS column or table names. By setting these options to YES, SAS will guarantee to preserve the case sensitivity of the names. If PRESERVE_TAB_NAMES=NO and PRESERVE_COL_NAMES=NO, then column names and table names that are read from the DBMS are converted to SAS names by using the SAS name normalization rules.

This example specifies SYBASE as the DBMS. When interfacing to SYBASE through ODBC, you might also need to use the LIBNAME options QUOTE_CHAR=, DBCONINIT= and DBLIBINIT= for the engine to recognize embedded blanks in the table and column names. SYBASE is generally case sensitive. Therefore, this example would produce a SYBASE table named "a" and columns named "x" and "y".

libname mydblib odbc user=TESTUSER password=testpass 

data mydblib.a;

If the DBMS was ORACLE, which is not case sensitive, the example would produce an ORACLE table named "A" and columns named "X" and "Y". The object names would be normalized to uppercase.

See SAS/ACCESS LIBNAME Options for more information about the PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES= options.

Chapter Contents



Top of Page

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