Hi,
I am new at SAS . I have a basic problem I want to analysis my oracle table on the SAS, So how can I send to my oracle table to SAS?
see the example at the foot of the documentation for SAS statement LIBNAME to access Oracle
To add another real world example:
If I go to my ODBC administrator in Windows and choose my odbc connection for my Oracle server and hit configure, it will show me the server name:
Server: OrServ
So at the top of my SAS program, I’ll add the below to use the Oracle connection almost like it’s a local SAS library.
%let orcuser=MyUserName;
%let orcpass=MyPassword;
libname OrServ oracle user="&orcuser." password="&orcpass." path='OrServ';
Then I can see my Oracle tables in the SAS explorer under the library named OrServ and can use it almost like any other library.
Proc sql;
Create table work.LocalTable as
Select MyField1, MyField2
From OrServ.OracleTableName
Where ...
;
quit;
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 how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.