A SERVICE OF

logo

114 PRESERVE_TAB_NAMES= LIBNAME Option Chapter 9
specifies that when you create DBMS tables or refer to an existing table, the table
names are derived from SAS member names by using SAS member name
normalization. However, the database applies DBMS-specific normalization rules to
the SAS member names. Therefore, the table names are created or referenced in the
database following the DBMS-specific normalization rules.
When you use SAS to read a list of table names (for example, in the SAS Explorer
window), the tables whose names do not conform to the SAS member name
normalization rules do not appear in the output. In SAS line mode, the number of
tables that do not display from PROC DATASET due to this restriction is noted as a
note:
Note: "Due to the PRESERVE_TAB_NAMES=NO libname option setting, 12
table(s) have not been displayed."
You will not get this warning when using SAS Explorer
SAS Explorer disiplays DBMS table names in capitalized form when
PRESERVE_TAB_NAMES=NO. This is now how the tables are represented in the
DBMS.
NO is the default for most DBMS interfaces.
YES
specifies that table names are read from and passed to the DBMS with special
characters, and the exact, case-sensitive spelling of the name is preserved. In the
SAS/ACCESS interface to Teradata, YES is the only supported value for this option.
Details
See the topic on naming in the documentation for your SAS/ACCESS interface for
additional details.
To use table names in your SAS program that are not valid SAS names, use one of
the following techniques:
Use the PROC SQL option DQUOTE and place double quotation marks around the
table name. The libref must specify PRESERVE_TAB_NAMES=YES. For example:
libname mydblib oracle user=testuser password=testpass
preserve_tab_names=yes;
proc sql dquote=ansi;
select * from mydblib."my table";
Use name literals in the SAS language. The libref must specify
PRESERVE_TAB_NAMES=YES. For example:
libname mydblib oracle user=testuser password=testpass preserve_tab_names=yes;
proc print data=mydblib.’my table’n;
run;
Specify the alias PRESERVE_NAMES= to save time if you are specifying both
PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES= in your LIBNAME
statement.
Oracle Details: Unless you specify PRESERVE_TAB_NAMES=YES, the table name
that you enter for SCHEMA= or for the DBINDEX= data set option is converted to
uppercase.
Example
You use PROC DATASETS to read the table names in an Oracle database that
contains three tables, My_Table, MY_TABLE, and MY TABLE. The results differ
depending on the setting of PRESERVE_TAB_NAMES.