I have the following issue : the SQL server I am trying to connect to using RODBC has a backslash in it.
Here is my code:
library(RODBC)
server <- "servername\REP"
database<- "databasename"
connectionString <- paste("Driver={SQL Server};server=",server,";database=",database,";trusted_connection=yes;")
channel <- odbcDriverConnect(connection=connectionString)
Of course \R causes an issue and the channel cannot be opened. One solution would be to escape the backslash:
server <- "servername\\REP"
But then the server name is not the right one anymore and the connection cannot be made.
Basically I am stuck needing server <- "servername\REP" to work!
Surely someone has already encountered this issue...