A SERVICE OF

logo

14 Preserving Table Names Chapter 2
Preserving Table Names
In the following example, you use PROC PRINT to print the DBMS table PAYROLL.
The DBMS table was created in uppercase and you set
PRESERVE_TAB_NAMES=YES, so you must specify the table name in uppercase in
your code. (If you set the PRESERVE_TAB_NAMES=NO, you can specify the DBMS
table name in lowercase.) A partial output follows the example.
options nodate linesize=64;
libname mydblib oracle user=testuser password=testpass
path=’ora8_servr’ preserve_tab_names=yes;
proc print data=mydblib.PAYROLL;
title ’PAYROLL Table’;
run;
Output 2.3 DBMS Table with a Case Sensitive Name
PAYROLL Table
Obs IDNUM SEX JOBCODE SALARY BIRTH
1 1919 M TA2 34376 12SEP1960:00:00:00
2 1653 F ME2 35108 15OCT1964:00:00:00
3 1400 M ME1 29769 05NOV1967:00:00:00
4 1350 F FA3 32886 31AUG1965:00:00:00
5 1401 M TA3 38822 13DEC1950:00:00:00
In the following example, you submit a SAS/ACCESS LIBNAME statement and then
open the SAS Explorer window, which lists the Oracle tables and views that are
referenced by the MYDBLIB libref. Notice that 16 members are listed and that all of the
member names are in the case (initial capitalization) that is set by the Explorer window.
The table names are capitalized because PRESERVE_TAB_NAMES= defaulted to NO.
libname mydblib oracle user=testuser pass=testpass;
Display 2.1 SAS Explorer Window Listing DBMS Objects
Next, you submit a SAS/ACCESS LIBNAME statement with
PRESERVE_TAB_NAMES=YES and then open the SAS Explorer window. This time,