[R] Error in importing table from SQL to R
Madan Mohan
madana_babu at infosys.com
Thu May 21 11:51:14 CEST 2009
Hi Friends,
I am trying to import a table from SQL server to R(2.9.0), however i am
getting errors while running the below codes. Can anyone identify and let me
know where did i go wrong??? Thanks in anticipation :)
library(RODBC)
myconn <- odbcConnect("RDATABASE")
myconn
RODB Connection 6
Details:
case=nochange
DSN=RDATABASE
Description=Database for R
UID=Madana_Babu
WSID=IBLPN1B049040
Trusted_Connection=Yes
NEWDATASQL1 <- sqlFetch(myconne, CampaignDataLarge)
Error in odbcTableExists(channel, sqtable) :
object 'CampaignDataLarge' not found
NEWDATASQL2 <- sqlFetch(myconne, CampaignDataLarge, colnames = FALSE,
rownames = TRUE)
Error in odbcTableExists(channel, sqtable) :
object 'CampaignDataLarge' not found
NEWDATASQL3 <- sqlFetchMore(myconne, CampaignDataLarge, colnames = TRUE,
rownames = TRUE)
NEWDATASQL3
[1] -1
NEWDATASQL4 <- sqlQuery(myconne, "select * from CampaignDataLarge", errors =
TRUE, colnames = FALSE, rownames = TRUE)
NEWDATASQL4
[1] "[RODBC] ERROR: Could not SQLExecDirect"
[2] "42S02 208 [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object
name 'CampaignDataLarge'."
Regards,
Madan
--
View this message in context: http://www.nabble.com/Error-in-importing-table-from-SQL-to-R-tp23650489p23650489.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list