Microsoft SQL Server and R

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Microsoft SQL Server and R

David Scott-6

I have a client running Microsoft SQL Server. I am interested in ways of
  accessing data from this server using R.

I would welcome any information about how this can be done. I have a
reasonable grasp of SQL and have experience with MySQL and RODBC but
don't know anything much about Microsoft SQL Server.

David Scott
--
_________________________________________________________________
David Scott Department of Statistics
                The University of Auckland, PB 92019
                Auckland 1142,    NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: [hidden email],  Fax: +64 9 373 7018

Director of Consulting, Department of Statistics

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Microsoft SQL Server and R

Jim Porzak
David,

You can certainly use RODBC to get to MS SQL, once you configure the
ODBC connection in windows.

These days I tend to use RJDBC http://www.rforge.net/RJDBC/ which is a
bit less of a hassle.

Hint use the jtds driver http://jtds.sourceforge.net/

HTH,
Jim Porzak
Ancestry.com
San Francisco, CA
www.linkedin.com/in/jimporzak
use R! Group SF: www.meetup.com/R-Users/


On Mon, Jan 25, 2010 at 2:55 PM, David Scott <[hidden email]> wrote:

>
> I have a client running Microsoft SQL Server. I am interested in ways of  accessing data from this server using R.
>
> I would welcome any information about how this can be done. I have a reasonable grasp of SQL and have experience with MySQL and RODBC but don't know anything much about Microsoft SQL Server.
>
> David Scott
> --
> _________________________________________________________________
> David Scott     Department of Statistics
>                The University of Auckland, PB 92019
>                Auckland 1142,    NEW ZEALAND
> Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
> Email:  [hidden email],  Fax: +64 9 373 7018
>
> Director of Consulting, Department of Statistics
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Microsoft SQL Server and R

Curt Seeliger
[hidden email] wrote on 01/25/2010 03:32:41 PM:
Jim writes to David:
> These days I tend to use RJDBC http://www.rforge.net/RJDBC/ which is a
> bit less of a hassle.
>
> Hint use the jtds driver http://jtds.sourceforge.net/
> ...
> >
> > I have a client running Microsoft SQL Server. I am interested in
> ways of  accessing data from this server using R.

We use RODBC here, with some snags:
a) The column types in the dataframes returned by sqlFetch() are
independent of the table definitions; instead they seem to be based on the
values in each column.
b) sqlQuery() will report an error if the query returns no rows, which is
perfectly legal and even expected when performing an update to a table.
c) Probably others too, but my memory is short today.

Good question, I'm hoping for some tips on this myself.

cur
--
Curt Seeliger, Data Ranger
Raytheon Information Services - Contractor to ORD
[hidden email]
541/754-4638

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Microsoft SQL Server and R

olga30dec
In reply to this post by David Scott-6
Hi David,
> I have a client running Microsoft SQL Server. I am interested in  
> ways of   accessing data from this server using R.
>
Why don't you try RMySQL package? It works fine for me.
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Microsoft SQL Server and R

Orvalho Augusto
RMySQL is for MySQL. MySQL is not MSSQL.

There is not RMSSQL. So the best you have something to conneto
MSSQL... RODBC or you may connect.

Or as Jim point you use a java client to connect to MSSQL through
RJDBC which you may use for example a free jDBC driver like jTDS.

Caveman


On Wed, Jan 27, 2010 at 12:44 PM, Olga Lyashevska <[hidden email]> wrote:

> Hi David,
>> I have a client running Microsoft SQL Server. I am interested in
>> ways of   accessing data from this server using R.
>>
> Why don't you try RMySQL package? It works fine for me.
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: [hidden email]
cell: +258828810980

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [R] Microsoft SQL Server and R

olga30dec
Yes,  checking it now, I see you are absolutely right. Sorry for this  
confusion.

Cheers,
Olga


On 27.01.2010, at 12:45, Orvalho Augusto wrote:

> RMySQL is for MySQL. MySQL is not MSSQL.
>
> There is not RMSSQL. So the best you have something to conneto
> MSSQL... RODBC or you may connect.
>
> Or as Jim point you use a java client to connect to MSSQL through
> RJDBC which you may use for example a free jDBC driver like jTDS.
>
> Caveman
>
>
> On Wed, Jan 27, 2010 at 12:44 PM, Olga Lyashevska  
> <[hidden email]> wrote:
>> Hi David,
>>> I have a client running Microsoft SQL Server. I am interested in
>>> ways of   accessing data from this server using R.
>>>
>> Why don't you try RMySQL package? It works fine for me.
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> OpenSource Software Consultant
> CENFOSS (www.cenfoss.co.mz)
> SP Tech (www.sptech.co.mz)
> email: [hidden email]
> cell: +258828810980

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.