[R] SQL via RODBC

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Oct 27 00:37:28 CEST 2012


That would be very implementation-specific, and ODBC is generic in its own way. No, you must run one query at a time in general, and deal with the results using the procedural language.

Keep in mind that you have to pick a back-end database to work with, and for creating the database you may have tools available that can directly process that sql file once.  Then you can use a small number of queries from within R to retrieve data at will. If the file contains data queries whose output you want to process in R, they have to be handled one-by-one.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

"Dr. Alireza Zolfaghari" <ali.zolfaghari at gmail.com> wrote:

>Hi list,
>Is there a way to use sqlQuery function where there is a sql file (ie.
>sample.sql)? I just want to mention that in my sql file there are some
>comment lines (starting with --). This means that if I paste all the
>lines
>in the sql file, I'll come up with a long string that most part of it
>is
>commneted (after commnet sign --).
>
>thanks
>Arvin
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org 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.




More information about the R-help mailing list