Wednesday, February 22, 2012

PROC SQL Explicit Pass thru


Use the PROC SQL Pass-Through Facility when you want to interact with DBMS
data by using SQL syntax that is specific to your DBMS.
In this example, SAS/ACCESS connects to an ORACLE database by using the alias
ora2, selects all rows in the STAFF table, and displays the first 15 rows of data by
using PROC SQL.

proc sql outobs=15;
connect to oracle as ora2 (user=user-id password=password);
select * from connection to ora2 (select lname, fname, state from staff);
disconnect from ora2;
quit;

No comments:

Post a Comment