BookmarkSubscribeRSS Feed
eyhm
Calcite | Level 5

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?

2 REPLIES 2
Peter_C
Rhodochrosite | Level 12

see the example at the foot of the documentation for SAS statement LIBNAME to access Oracle

Mishka1
Fluorite | Level 6

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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1436 views
  • 0 likes
  • 3 in conversation