Sunday, December 13, 2015

RODBC connection R - Spotfire



Below is the R Script for connecting to ODBC using R language:-

library("RODBC")
ch<-odbcConnect("smart", uid = "user_id", pwd = "pwd",believeNRows = FALSE)
sqlTables(ch)
odbcGetInfo(ch)
sqlStr<-"select * from `Test`"
sqlQuery(ch, paste(sqlStr))

Now you can export this data frame into Sptofire Data Table and can be used for Reporting.

No comments:

Post a Comment