DATA Step, Macro, Functions and more

Read data from SQL server

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Read data from SQL server

How can I directly import data from SQL server to SAS? Is there sample code? Thank you!


Accepted Solutions
Solution
2 weeks ago
PROC Star
Posts: 251

Re: Read data from SQL server

you can do this by defining libname as shown below or by doing explicit pass through

LIBNAME SQL ODBC DSN=’sql server’ user=sasjlb pw=pwd;

 

Below two papers will be to give lot of info on this

https://support.sas.com/techsup/technote/ts765.pdf

http://analytics.ncsu.edu/sesug/2002/DM10.pdf

 

View solution in original post


All Replies
Super User
Posts: 17,724

Re: Read data from SQL server

First you need to connect to SQL and that depends on your system set up. 

Occasional Contributor
Posts: 18

Re: Read data from SQL server

Thank you for response!

Solution
2 weeks ago
PROC Star
Posts: 251

Re: Read data from SQL server

you can do this by defining libname as shown below or by doing explicit pass through

LIBNAME SQL ODBC DSN=’sql server’ user=sasjlb pw=pwd;

 

Below two papers will be to give lot of info on this

https://support.sas.com/techsup/technote/ts765.pdf

http://analytics.ncsu.edu/sesug/2002/DM10.pdf

 

Occasional Contributor
Posts: 18

Re: Read data from SQL server

Thank you!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 126 views
  • 2 likes
  • 3 in conversation