Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract the data from other databases(oracle,oracle clinical,.. 1

Status
Not open for further replies.

YP20

Programmer
Mar 17, 2003
2
US
Hi ,

I am just learning SAS and trying to get idea for the above qn?
Could U give me the infirmation about extraction of data from other sources into sas datasets where I don't have any SAS/ACCESS product.

can U show me with example what r the possible options if possible?

Thanks,
Yp20.

 
Do you have the ODBC addon??? If so, accessing & updating databases is QUITE easy.

Ex - I use sqlserver - when I go against the DB I use

libname TechDB odbc
dsn=sqlserver DATASRC="Tech";

The DATASRC is what the ODBC connection is called on your the machine running the SAS job.

To access a table I simply say
data These;
set TechDB.SOP10200; /*pull the SOP table*/

updating, deleteing and appending are also quite easy... if you have the ODBC part.
 
I use Oracle here. so we use the following snipped of code:

proc sql stimer;
connect to oracle as mydb(user=username orapw=password path="path-to-db" preserve buffsize=1000);

create table lib.table as
select *
from connection to mydb

(ORACLE SQL QUERY);

disconnect from mydb;
 
Thanks for all, and it was quite helpful for me to go forward with data manipulations .



Thanks ,
YP20.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top