Reading data from Microsoft SQL Server into R

前端 未结 7 735
长发绾君心
长发绾君心 2021-02-01 02:17

Is it 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.

7条回答
  •  Happy的楠姐
    2021-02-01 02:55

    library("RODBC")

    dbhandle <- odbcDriverConnect('driver={SQL Server};server=;database=;trusted_connection=true')

    currTableSQL<-paste("SELECT * FROM ",sep="")

    currTableDF<-sqlQuery(dbhandle,currTableSQL)

提交回复
热议问题