1.Setting ODBC in windows Control panel
2.install R package "RODBC"
3.In R Command Line
> library(RODBC)
> channel = odbcConnect("$ODBC_Name") //Create Connection
> odbcGetInfo(channel) //Get odbc connection info
> odbcQuery(channel,"$SQL_command") //Set SQL Command String
> sqlGetResults(channel, max=$TopNumber) //get top N Data
2.install R package "RODBC"
3.In R Command Line
> library(RODBC)
> channel = odbcConnect("$ODBC_Name") //Create Connection
> odbcGetInfo(channel) //Get odbc connection info
> odbcQuery(channel,"$SQL_command") //Set SQL Command String
> sqlGetResults(channel, max=$TopNumber) //get top N Data
留言