This example creates
an access descriptor and a view descriptor based on Oracle data.
options linesize=80;
libname adlib 'SAS-library';
libname vlib 'SAS-library';
proc access dbms=oracle;
/* create access descriptor */
create adlib.customer.access;
user=testuser;
orapw=testpass;
table=customers;
path='myorapath';
assign=yes;
rename customer=custnum;
format firstorder date9.;
list all;
/* create view descriptor */
create vlib.usacust.view;
select customer state zipcode name
firstorder;
subset where customer like '1%';
run;
This next example creates
another view descriptor that is based on the ADLIB.CUSTOMER access
descriptor. You can then print the view.
/* create socust view */
proc access dbms=oracle accdesc=adlib.customer;
create vlib.socust.view;
select customer state name contact;
subset where state in ('NC', 'VA', 'TX');
run;
/* print socust view */
proc print data=vlib.socust;
title 'Customers in Southern States';
run;