SAS Names and Support for DBMS Names |
The
following two tables illustrate how SAS/ACCESS handles
variable names when creating DBMS objects such as tables and views. This information
applies generally to all interfaces. In some cases, however, it is not necessary
to specify these options because the option default values are DBMS-specific.
See the documentation for your DBMS for details. Examples that illustrate the different types of naming actions and defaults
are available.
SAS Variable Names to DBMS Column Names When Creating Tables
SAS Variable Name as Input |
Desired DBMS Column Name |
Options
|
Any SAS variable name, such as Miles |
Default DBMS column name (normalized to follow the DBMS's
naming conventions), such as MILES |
PRESERVE_COL_NAMES=NO |
A case-sensitive SAS variable name, such as Miles |
Case-sensitive DBMS column name, such as Miles |
PRESERVE_COL_NAMES=YES |
A SAS variable name with characters that are not valid
in a normalized SAS name, such as Miles-to-Go |
Case-sensitive DBMS column name that matches the SAS
name, such as Miles-to-Go |
PROC SQL DQUOTE=ANSI and PRESERVE_COL_NAMES=YES or,
in a DATA or PROC step, use a SAS name literal and PRESERVE_COL_NAMES=YES
and VALIDVARNAME=ANY |
SAS Data Set Names to DBMS Table Names
SAS Data Set Name as Input |
Desired DBMS Table Name |
Options |
Any SAS data set name, such as Payroll |
Default DBMS table name (normalized to follow the DBMS's
naming conventions), such as PAYROLL |
PRESERVE_TAB_NAMES=NO |
Case-sensitive SAS data set name, such as Payroll |
Case-sensitive DBMS table name, such as Payroll |
PRESERVE_TAB_NAMES=YES |
Case-sensitive SAS data set name with characters that
are not valid in a normalized SAS name, such as Payroll-for-QC |
Case-sensitive DBMS table name that matches the SAS
name, such as Payroll-for-QC |
PROC SQL DQUOTE=ANSI and PRESERVE_TAB_NAMES=YES or,
in a DATA or PROC step, use a SAS name literal and PRESERVE_TAB_NAMES=YES |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.