Naming Behavior When Retrieving DBMS Data

The tables in this section illustrate how SAS/ACCESS processes DBMS names when it retrieves data from a DBMS. This information applies generally to all interfaces. However, in some cases you need not specify these options because the option default values are DBMS-specific. For details, see the DBMS-specific reference section for your SAS/ACCESS interface. Examples are available that illustrate the different types of naming actions and defaults.
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