What is the Code We Use to Connect to Oracle Database from SAS In Unix Environment & Windowing Environment
PLease give me the reply
* i have all the information in oracle database .I want to get that information from oracle database and i want to work in SAS ENVIRONMENT .Please tell me the code for this .
Read the xxxx manual: SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Third Edition
You need to have the connection information, then you can either do it directly or through pass through:
Directly:
proc sql;
connect to oracle (path=dddd user=aaa orapw=cccc);
create table work.test as
select * from connection to oracle (
select...
from...
);
disconnect from oracle;
quit;
Pass-through:
proc sql;
connect to oracle (path=dddd user=aaa orapw=cccc);
execute (drop table A_TABLE) by oracle;
execute (commit) by oracle;
disconnect from oracle;
quit;
Just to be clear about the concepts. Both these examples are usually defined as Explicit SQL Pass-thru - you explicitly write native DBMS specific SQL.
You can use SAS programs to access a libref that points to DBMS schema. The part of the SAS logic that the SAS/ACCESS libname engine can transform to native DBMS SQL will be automatically sent to the DBMS for processing. This is true for both SAS SQL, PROC's and Data step, in the later mainly WHERE-clauses. This is known as Implicit SQL pass-thru.
thank you for your answers
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.