tags:

views:

83

answers:

2

Does anyone know whether it is possible to read the data stored in MS SQL server from R interface? If it is I would be also thankful if anyone could show the way to do it.

Thank you!

+1  A: 

Tried the RODBC package already?

http://cran.r-project.org/web/packages/RODBC/index.html

There's also the RJDBC package : http://www.rforge.net/RJDBC/

See also : http://www.r-bloggers.com/connecting-to-sql-server-from-r-using-rjdbc/

Joris Meys
A: 

Niko, What operating system are you running? The answer to your question varies, depending on the platform you are using.

If you are using Windows (of any stripe), connecting to MSSQL Server via ODBC (RODBC) makes the most sense. When I connect to a MSSQL Server on Linux, I use JDBC as suggested by Joris. I would assume that JDBC is also the best solution for Macs, but I could very well be wrong.

Choens
The freetds package on Linux has worked for me too, in conjunction with RODBC.
Dirk Eddelbuettel
I didn't even think of freetds but you're right that would be a good option. I usually feel that a JDBC connection is easier to set up, but it also requires Java which some folks find frustrating / difficult to work with.
Choens