I've got a working connection to a SAP Hana database from my companies R-server. My connection is straight forward and looks like this:
library(dplyr)
myQuery <- 'SELECT Var1, Var___2
FROM .... '
myDB <- odbcConnect("sapName", uid = "user", pwd = "password", DBMSencoding = "UTF-8")
sqlQuery(myDB, myQuery)
My problem is that most queries will work fine. However, some of the variables have been name with 3 underscores, these I cannot get out.
2 out of 3 coworkers can perform the query from R - and it will work. The last has the same error has me. The query will work fine on SAP Hana.
I've checked that all packages are the same version.
I'm at loss at what to look at.
The problem turned out to be a an issue with how our licenses where created on the SAP HANA database. We where not asked to create a new password when logging on the first time, and this apparantly gives issues in viewing certain types of data.
Solution was to delete and re-create our users, resetting them was not enough.