![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/b/da/bda6fccb-b246-43e7-a520-a01ed647b8cf/bda6fccb-b246-43e7-a520-a01ed647b8cf-bg7b.png)
The LIBNAME Statement for Relational Databases PRESERVE_TAB_NAMES= LIBNAME Option 113
See the topic about naming in the documentation for your SAS/ACCESS interface for
additional details.
Specify the alias PRESERVE_NAMES= if you plan to specify both the
PRESERVE_COL_NAMES= and PRESERVE_TAB_NAMES= options in your
LIBNAME statement. Using this alias saves you some time when coding.
To use column names in your SAS program that are not valid SAS names, you must
use one of the following techniques:
Use the DQUOTE option in PROC SQL and then reference your columns using
double quotation marks. For example:
proc sql dquote=ansi;
select "Total$Cost" from mydblib.mytable;
Specify the global system option VALIDVARNAME= ANY and use name literals in
the SAS language. For example:
proc print data=mydblib.mytable;
format ’Total$Cost’n 22.2;
Note that if you are creating a table in PROC SQL, you must also include the
PRESERVE_COL_NAMES=YES option in your LIBNAME statement. For example:
libname mydblib oracle user=testuser password=testpass
preserve_col_names=yes;
proc sql dquote=ansi;
create table mydblib.mytable ("my$column" int);
PRESERVE_COL_NAMES= does not apply to the Pass-Through Facility.
See Also
To apply this option to an individual data set, see the data set option
“PRESERVE_COL_NAMES= Data Set Option” on page 200
PRESERVE_TAB_NAMES= LIBNAME Option
Preserves spaces, special characters, and case sensitivity in DBMS table names
Valid in:
the SAS/ACCESS LIBNAME statement
DBMS support: DB2 OS/390, DB2 UNIX/PC, Informix, ODBC, OLE DB, Oracle,
Microsoft SQL Server
Default value: DBMS-specific
Syntax
PRESERVE_TAB_NAMES= NO | YES
Syntax Description
NO