13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase 4 Example 7493 The TABLE= statement <strong>for</strong> PROC <strong>ACCESS</strong> is:TABLE= table-name;specifies the name of the Sybase table or Sybase view on which the accessdescriptor is based.ExampleThe following example creates access descriptors and view descriptors <strong>for</strong> theEMPLOYEES and INVOICE tables. These tables have different owners and are storedin PERSONNEL and INVENTORY databases that reside on different machines. TheUSER= and PASSWORD= statements identify the owners of the Sybase tables andtheir passwords.libname vlib ’sas-data-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;<strong>for</strong>mat 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;<strong>for</strong>mat 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 andWho Submitted Them’;proc sql;select invnum, country, billedon, paidon,billedby, lastname, firstnamfrom vlib.emp_acc, vlib.sainvwhere emp_acc.empid=sainv.billedby;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!