SAS Names and Support for DBMS Names |
The
following two tables illustrate how SAS/ACCESS processes
DBMS names when retrieving data from a DBMS. 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 SAS/ACCESS interface
for details. Examples that illustrate the different
types of naming actions and defaults are available.
DBMS Column Names to SAS Variable Names When Reading DBMS Data
DBMS Column Name |
Desired SAS Variable Name |
Options |
Case-sensitive DBMS column name, such as Flight |
Case-sensitive SAS variable name, such as Flight |
No options are necessary |
DBMS column name with characters that are not valid
in SAS names, such as My$Flight |
Case-sensitive SAS variable name where an underscore
replaces the invalid characters, such as My_Flight |
No options are necessary |
DBMS column name with characters that are not valid
in SAS names, such as My$Flight |
Nonstandard, case-sensitive SAS variable name, such
as My$Flight |
PROC SQL DQUOTE=ANSI or, in a DATA or PROC step, use
a SAS name literal such as 'My$Flight'n and
VALIDVARNAME=ANY |
DBMS Table Names to SAS Data Set Names When Reading DBMS Data
DBMS Table Name |
Desired SAS Data Set Name |
Options |
Default DBMS table name, such as STAFF |
Default SAS data set or member name (uppercase), such
as STAFF |
PRESERVE_TAB_NAMES=NO |
Case-sensitive DBMS table name, such as Staff |
Case-sensitive SAS data set, such as Staff |
PRESERVE_TAB_NAMES=YES |
DBMS table name with characters that are not valid in
SAS names, such as All$Staff |
Nonstandard, case-sensitive SAS data set name, such
as All$Staff |
PROC SQLDQUOTE=ANSI and PRESERVE_TAB_NAMES=YES or, in
a DATA step or PROC, use a SAS name literal such as 'All$Staff'n and PRESERVE_TAB_NAMES=YES |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.