Tutorial by Examples

While RODBC is restricted to Windows computers with compatible architecture between R and any target RDMS, one of its key flexibilities is to work with Excel files as if they were SQL databases. require(RODBC) con = odbcConnectExcel("myfile.xlsx") # open a connection to the Excel file s...
Another use of RODBC is in connecting with SQL Server Management Database. We need to specify the 'Driver' i.e. SQL Server here, the database name "Atilla" and then use the sqlQuery to extract either the full table or a fraction of it. library(RODBC) cn <- odbcDriverConnect(connect...
library(RODBC) con <- odbcDriverConnect("driver={Sql Server};server=servername;trusted connection=true") dat <- sqlQuery(con, "select * from table"); close(con) This will connect to a SQL Server instance. For more information on what your connection string should loo...

Page 1 of 1