When the LIBNAME engine reads a
column name that contains characters that are not allowed in standard SAS names, the default
behavior is to replace an unsupported character with an underscore (_). For example,
the
database column name
Amount
Budgeted$
becomes the SAS name
Amount_Budgeted_
.
Note: Nonstandard names include
those with blank spaces or special characters (such as @, #, %) that
are not allowed in SAS names unless the VALIDVARNAME=ANY option is
set. When a SAS data set contains special characters in column names
and the data set is accessed without setting the VALIDVARNAME=ANY
option, the LIBNAME engine replaces the special characters with underscores,
but no message is issued.
When SAS encounters a
DBMS name that exceeds 32 characters, SAS truncates the name. After it has modified or
truncated a DBMS column name, SAS appends a number to the name, if necessary, to preserve
uniqueness. For
example, DBMS column names
MY$DEPT
,
My$Dept
,
and
my$dept
become SAS names
MY_DEPT
,
MY_Dept0
,
and
my_dept1
.
To change how SAS handles case-sensitive or nonstandard table and column names, specify
one or more of the following options:
PRESERVE_TAB_NAMES=YES
is a LIBNAME statement
option. When set to YES, this option preserves blank spaces, special
characters, and mixed case in table names. See
PRESERVE_TAB_NAMES= LIBNAME Statement Option for more information about this option.
The availability of these options and their default settings are
data source specific. See the
SAS/ACCESS documentation for your DBMS for information about how the
SAS/ACCESS engine for your DBMS processes names.