A SERVICE OF

logo

112 PRESERVE_COL_NAMES= LIBNAME Option Chapter 9
PRESERVE_COL_NAMES= LIBNAME Option
Preserves spaces, special characters, and case sensitivity in DBMS column names when you
create DBMS tables
Valid in: the SAS/ACCESS LIBNAME statement (when you create DBMS tables)
DBMS support:
DB2 OS/390, DB2 UNIX/PC, Informix, ODBC, OLE DB, Oracle,
Microsoft SQL Server
Default value:
DBMS-specific
Syntax
PRESERVE_COL_NAMES= NO | YES
Syntax Description
NO
specifies that column names that are used in DBMS table creation are derived from
SAS variable names by using the SAS variable name normalization rules (see the
VALIDVARNAME system option for more information). However, the database will
apply its DBMS-specific normalization rules to the SAS variable names when
creating the DBMS column names.
The use of N-Literals to create column names that use database keywords or
special symbols other than the underscore character might be illegal when DBMS
normalization rules are applied. To include nonstandard SAS symbols or database
keywords, specify PRESERVE_COL_NAMES=YES.
NO is the default for most DBMS interfaces.
YES
specifies that column names that are used in table creation are passed to the DBMS
with special characters and the exact, case-sensitive spelling of the name preserved.
In the SAS/ACCESS interface to Teradata, YES is the only supported value for
this option.
Details
This option applies only when you use SAS/ACCESS to create a new DBMS table. When
you create a table, you assign the column names by using one of the following methods:
To control the case of the DBMS column names, specify variables using the desired
case and set PRESERVE_COL_NAMES=YES. If you use special symbols or blanks,
you must set VALIDVARNAME= to ANY and use N-Literals. See the section on
names in SAS/ACCESS for Relational Databases: Reference and the section on
system options in SAS Language Reference: Dictionary for further information.
To allow the DBMS to normalize the column names according to its naming
conventions, specify variables using any case and set
PRESERVE_COLUMN_NAMES= NO.
Note: When you use SAS/ACCESS to read from, insert rows into, or modify data in
an existing DBMS table, SAS identifies the database column names by their spelling.
Therefore, when the database column exists, the case of the variable does not matter.