The following example
creates access descriptors and view descriptors for the EMPLOYEES
and INVOICE tables. These tables have different owners and are stored
in PERSONNEL and INVENTORY databases that reside on different machines.
The USER= and PASSWORD= statements identify the owners of the Sybase
tables and their passwords.
libname vlib 'sas-library';
proc access dbms=sybase;
create work.employee.access;
server='server1';
database='personnel';
user='testuser1';
password='testpass1';
table=EMPLOYEES;
create vlib.emp_acc.view;
select all;
format empid 6.;
subset where DEPT like 'ACC%';
run;
proc access dbms=sybase;
create work.invoice.access;
server='server2';
database='inventory';
user='testuser2';
password='testpass2';
table=INVOICE;
rename invoicenum=invnum;
format invoicenum 6. billedon date9.
paidon date9.;
create vlib.sainv.view;
select all;
subset where COUNTRY in ('Argentina','Brazil');
run;
options linesize=120;
title 'South American Invoices and
Who Submitted Them';
proc sql;
select invnum, country, billedon, paidon,
billedby, lastname, firstnam
from vlib.emp_acc, vlib.sainv
where emp_acc.empid=sainv.billedby;
Sybase is a case-sensitive
database. The PROC ACCESS database identification statements and the
Sybase column names in all statements except SUBSET are converted
to uppercase unless the names are enclosed in quotation marks. The
SUBSET statements are passed to Sybase exactly as you enter them,
so you must use the correct case for the Sybase column names.